plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Question]: [Connectivity_Plus] If user have their W-Fi feature on, But didn't connected to any network. ConnectivityResult enum will return as either mobile or none. Is this expected behavior?

Open famasf1 opened this issue 1 year ago • 1 comments

What is your question?

I'm trying to check whether or not user already turned Wi-Fi on or not. Without having to connect to any Wi-Fi connection prior.

Future<List<ConnectivityResult>> isWifiOn() async {
    return await connectivity.checkConnectivity();
  }

However, this code will always return as either ConnectivityResult.mobile or ConnectivityResult.none and will not change unless i connected to atleast 1 Wi-Fi spot. I'm not sure if this is expected behavior since my understanding is that it always detecting based on wifi service itself and not the connection.

Checklist before submitting a question

  • [X] I searched issues in this repository and couldn't find such bug/problem
  • [X] I Google'd a solution and I couldn't find it
  • [X] I searched on StackOverflow for a solution and I couldn't find it
  • [X] I read the README.md file of the plugin
  • [X] I am using the latest version of the plugin
  • [X] All dependencies are up to date with flutter pub upgrade
  • [X] I did a flutter clean
  • [X] I tried running the example project

famasf1 avatar Jun 05 '24 08:06 famasf1

Plugin doesn't tell if the service is on/off, so this is expected behavior.

vbuberen avatar Jun 05 '24 08:06 vbuberen

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Sep 04 '24 00:09 github-actions[bot]