We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can get getWifiName by network_info_plus . But Can not get the GatewayIP.
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered:
You need to provide more details in your question, like which platform are you using, which plugin version, if you ran the example project, etc.
Sorry, something went wrong.
插件 getGatewayIPAddress 方法 val linkAddresses = connectivityManager?.getLinkProperties(connectivityManager.activeNetwork) 获取的是可用的网络,并不是连接的wifi网络,比如说你同时连接wifi网络,和5G网络,并且正巧你的wifi网络不可用获取的就是5G网络的网关地址,所有需要修改插件源码: val networks = connectivityManager.allNetworks for (network in networks) { val networkCapabilities = connectivityManager.getNetworkCapabilities(network) if (networkCapabilities != null && networkCapabilities.hasTransport( NetworkCapabilities.TRANSPORT_WIFI)) { // 获取 Wi-Fi 的 LinkProperties val linkProperties = connectivityManager.getLinkProperties(network) Log.d("TAG", "Wi-Fi LinkProperties: $linkProperties") Log.d("TAG", "Wi-Fi LinkProperties dhcpServerAddress : ${linkProperties!!.dhcpServerAddress!!.hostAddress}") } },希望作者能重新加一个新的方法,获取修改下方法,再次上传到pub网站上使用,谢谢
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days
No branches or pull requests
What is your question?
I can get getWifiName by network_info_plus .
But Can not get the GatewayIP.
Checklist before submitting a question
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: