-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Plugin
network_info_plus
Use case
Problem:
I want to check whether the currently connected Wi-Fi network is secure or not, for example, if it is open (no password) or protected (e.g. WPA/WPA2/WPA3).
This is useful for showing security warnings to users or preventing sensitive operations on unsecured networks.
Right now, network_info_plus does not offer this, and it’s difficult to do manually in a cross-platform way.
The current network_info_plus plugin provides network info such as SSID, BSSID, and IP, but does not expose the Wi-Fi security protocol being used.
This limitation makes it difficult to:
- Alert users when they are on unprotected/open networks
- Comply with VAPT (Vulnerability Assessment and Penetration Testing) security requirements
- Implement app level logic based on Wi-Fi trust level (e.g. blocking login, warning banners)
Proposal
Add a new method like:
Future<bool?> isSecureWifi();
which returns:
- false → for open (No Password)
- true → for WPA/WPA2/WPA3
- null → if not connected or can't determine
Platform support:
iOS (14+):
- Use NEHotspotNetwork.fetchCurrent().securityType (available in iOS 14+)
- Requires proper entitlements (com.apple.developer.networking.wifi-info) and location permission
Android (12+):
- Use WifiInfo.getCurrentSecurityType()
- For older versions, fallback to analyzing WifiConfiguration.allowedKeyManagement if possible
Alternatives Tried
- No Flutter plugin currently provides this.
- Custom platform code is needed, but it would be better if network_info_plus provided this out-of-the-box.