plus_plugins
plus_plugins copied to clipboard
[Request]: [connectivity_plus] Get network state regardless of internet connection
Plugin
connectivity_plus
Use case
I would like to check, whether Wi-Fi is turned on or off. I don't care, if there is an internet connection available or not. Same for mobile data.
Currently when I have Wi-Fi enabled but it's not connected to any network, I get ConnectivityResult.none
.
Proposal
I'd expect the Connectivity::checkConnectivity()
method to return which hardware features (Wi-Fi, mobile data) are turned on and not through which hardware the internet connection is established.
Maybe another method would suite that use case better like
Future<List<ConnectivityResult>> getConnectivityHardwareStates()
I've been looking into ways to implement this FR but haven't really made any progress thus far. I don't see any solution other than to manually check if WiFi, Bluetooth and Mobile Radio is turned on separately.
Any suggestions and pointers on how to approach this other than the method described above?