English 中文(简体)
如何用一些信息获得附近的wifi名单
原标题:How to get the nearby wifi list with some information
  • 时间:2024-03-03 16:48:21
  •  标签:
  • flutter

我想用一个故事来记录附近的Wi-FiSSID名单。 我发现<代码>wifi_info_flutterplugin已经过时。 哪一种假想或方法能做同样的事? 谢谢。

问题回答

You can use these 2 packages: connectivity_plus and network_info_plus

final ConnectivityResult connectivityResult = await Connectivity().checkConnectivity();
if (connectivityResult == ConnectivityResult.wifi) {
  // Get the Wi-Fi s SSID
  final String ssid = await NetworkInfo().getWifiName();

  print( Wi-Fi SSID: $ssid );

} else {
  print( Device not connected );
}




相关问题
Flutter App cannot be installed on Android TV

I m building a Flutter app that should support Android TV and Mobile devices. Despite Google Play shows that it is supported, I cannot install app on my MiBox device. While trying to install it, both ...

Moving the icon button to the right causes rendering issues

I am trying to align the icon button to the right of the Text field, I tried the row which made the icon button not centered vertically and now I am trying out the Stack widget. Here is my code - ...

热门标签