plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Request]: [connectivity_plus] Get network state regardless of internet connection

Open c15yi opened this issue 2 years ago • 1 comments

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()

c15yi avatar Jul 13 '22 12:07 c15yi

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?

maranix avatar Nov 02 '22 13:11 maranix