A simple plugin that allows network scanning on android.
Getting Started #
In your pubspec add the dependency
Due to iOS limitations, it is impossible to retrieve a list of nearby wifi networks. Unfortunately the same will hold true for android R+. However, for the time being, this simple plugin will return a list of wifi networks on android.
networks is a list of
WifiNetwork each wifiNetwork object contains the SSID, RSSI (signal strength), and a boolean flag indicating if the network is secure.
final networks = WifiFlutter.wifiNetworks;
Retrieves the most recent wifi networks. The scan is done periodically by android so this list shouldn't be terribly out of date.
final networks = WifiFlutter.scanNetworks();
Attempts a network scan and retrieves a list of the results of that scan.
final prompted = WifiFlutter.promptPermissions();
If the required permissions are not accessible, this will prompt the user for them. It returns true if it made a prompt (the permissions weren't available) or false if it didn't make a prompt (the permissions were available and the code that requires the permissions can be run).
- Improved pubspec description
- Created simple android plugin for querying nearby wifi networks
Demonstrates how to use the wifi_flutter plugin.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: wifi_flutter: ^0.1.0+1
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jan 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
- Flutter: 1.12.13+hotfix.5