Skip to content
Blog

WiFi Discovery in Flutter: Scanning, SSIDs, and Connecting

Scan and read WiFi networks in Flutter with wifi_scan, network_info_plus, and wifi_iot - including Android scan throttling, iOS SSID restrictions, and a platform matrix.

Published on • November 10, 2026

AI Assistant

WiFi-based features look simple until you hit Android’s scan throttling and Apple’s refusal to hand out SSIDs. Flutter has three well-known pub.dev plugins that split the job cleanly: one scans, one reads the network you are on, and one connects. This post shows how each works, the exact permissions they need, and what simply does not exist on each platform.

Three packages, three jobs

All three come from established publishers and are still being maintained:

dependencies:
  flutter:
    sdk: flutter
  wifi_scan: ^0.5.0        # scan nearby access points
  network_info_plus: ^8.2.2 # info about the current network
  wifi_iot: ^0.4.0          # connect to / manage networks
  • wifi_scan (WiFiFlutter suite) scans and returns WiFiAccessPoint objects. It replaced the scanning feature that was discontinued inside wifi_iot.
  • network_info_plus (Flutter Favorite, plus_plugins) reports the current connection: SSID, BSSID, IP, gateway, submask. It supports Android, iOS, macOS, Linux, and Windows - not web.
  • wifi_iot handles connecting, disconnecting, registering networks, and hotspot control. Its own README warns that several commands “have no effect on iOS because Apple don’t let us do whatever we want”.

Scanning access points with wifi_scan

The plugin is a singleton, WiFiScan.instance, and every call is guarded by a capability check:

final can = await WiFiScan.instance.canStartScan(askPermissions: true);
if (can != CanStartScan.yes) return; // handle noLocation / noHardware / etc.

await WiFiScan.instance.startScan();

final canGet = await WiFiScan.instance.canGetScannedResults(askPermissions: true);
if (canGet != CanGetScannedResults.yes) return;

final List<WiFiAccessPoint> aps = await WiFiScan.instance.getScannedResults();
for (final ap in aps) {
  print('${ap.ssid}  ${ap.bssid}  ${ap.level} dBm  ${ap.frequency} MHz');
}

Each WiFiAccessPoint exposes ssid, bssid, level (signal strength in dBm, i.e. RSSI), frequency, capabilities, plus extras like standard, isPasspoint, and timestamp. getScannedResults() can be called independently of startScan() - it returns the latest cached results - and onScannedResultsAvailable is a Stream you can wire to a StreamBuilder.

Android: permissions and scan throttling

Two separate constraints apply, and missing either one produces empty lists rather than errors:

  1. Permissions. On Android 10+ targeting API 29+, startScan() needs ACCESS_FINE_LOCATION and CHANGE_WIFI_STATE, with location services enabled on the device; getScannedResults() needs ACCESS_FINE_LOCATION plus ACCESS_WIFI_STATE. Declare them in the manifest and request at runtime with permission_handler.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  1. Throttling. Per Google’s Wi-Fi scanning guide, Android 9+ allows a foreground app 4 scans per 2 minutes, and all background apps combined 1 scan per 30 minutes; Android 10 keeps those limits (a developer option can disable them for local testing only). Design your UI around cached results instead of hammering startScan(), and remember the returned list can be stale if a scan has not finished.

Reading the current network: network_info_plus

import 'package:network_info_plus/network_info_plus.dart';

final info = NetworkInfo();
final ssid = await info.getWifiName();   // may come back quoted, e.g. "HomeWiFi"
final bssid = await info.getWifiBSSID(); // 11:22:33:44:55:66
final ip = await info.getWifiIP();
final gateway = await info.getWifiGatewayIP();

Gotchas straight from the README: Android wraps the SSID in double quotes when it contains spaces, and on Android 10+ you need ACCESS_FINE_LOCATION with location services on. On iOS you need the com.apple.developer.networking.wifi-info entitlement (the “Access Wi-Fi information” capability, which requires a paid development team) and one of four conditions - Core Location authorization, an app-configured hotspot via NEHotspotConfiguration, an active VPN, or an active NEDNSSettingsManager config. Without them, getWifiName() and getWifiBSSID() return null; simulators always return null.

Connecting programmatically with wifi_iot

import 'package:wifi_iot/wifi_iot.dart';

final ok = await WiFiForIoTPlugin.connect(
  "DeviceSetup-AP",
  password: "secret-pass",
  security: NetworkSecurity.WPA2,
  joinOnce: false,      // keep the network after the app closes
  withInternet: true,   // uses the wifi-suggest API so it survives the session
  timeoutInSeconds: 30,
);
if (ok) await WiFiForIoTPlugin.forceWifiUsage(true); // route app traffic over WiFi

Platform limits you must design around:

  • On Android 10+, setEnabled() (enable/disable the WiFi module) is deprecated and always fails - pass shouldOpenSettings: true to jump to Settings instead.
  • WEP connections always fail; registerWifiNetwork() needs user approval and the saved network is not under your control; clean up with removeWifiNetwork(ssid).
  • findAndConnect() and registerWifiNetwork() are Android-only. On iOS you can only disconnect networks your own app added, and scanning there is marked “discontinued” - use wifi_scan instead.
  • The README also notes the package needs use_frameworks! in the iOS Podfile.

Platform support matrix

CapabilityAndroidiOSWindows / Linux / macOS
Scan (SSID/BSSID/RSSI list)Yes, throttledNo public API - stub returns sane empty resultsNo
Read current SSID/BSSIDYes, location requiredYes, entitlement + one of 4 conditionsPartial via network_info_plus
Connect to a networkYesLimited (app-added networks)No
Hotspot / AP controlLocal-only hotspot (no internet, generated credentials)NoNo
IP, gateway, submask, DNSYesYesYes (network_info_plus)

Takeaway: Use wifi_scan for the access-point list (mind the 4-scans-per-2-minutes Android throttle and location permission), network_info_plus for the current connection (with the iOS wifi-info entitlement), and wifi_iot for connecting - and never promise SSID scanning or hotspot control on iOS, because those APIs do not exist there.

Sources