network_checker_plus 1.0.6 copy "network_checker_plus: ^1.0.6" to clipboard
network_checker_plus: ^1.0.6 copied to clipboard

PlatformAndroid

A Flutter plugin to check network connectivity, type, and more.

πŸ“‘ network_checker_plus #

Pub Version Platform Support License: MIT

A lightweight and efficient Flutter plugin to check the network status of the device. Easily determine whether the user is connected to the internet and what type of network they’re using β€” Wi-Fi, mobile data, or none. Now with support for network speed, signal strength, and real-time connectivity stream.


✨ Features #

βœ… Check if the device is connected to the internet

βœ… Detect the type of connection (Wi-Fi, Mobile, or None)

βœ… Estimate network speed (e.g., ping a server or download a small file)

βœ… Measure signal strength (Wi-Fi)

βœ… Real-time stream of connectivity status


πŸš€ Getting Started #

1️⃣ Add Dependency #

Add this to your pubspec.yaml:

dependencies:
  network_checker_plus: ^1.0.6

Then run:

flutter pub get

2️⃣ Import the Package #

import 'package:network_checker_plus/network_checker_plus.dart';

πŸ” Usage #

βœ… Check Internet Status #

final bool isConnected = await NetworkCheckerPlus.isConnected();
print('Connected: \$isConnected');

πŸ“‘ Get Connection Type #

final String type = await NetworkCheckerPlus.getConnectionType();
print('Connection Type: \$type');

Possible values:

  • 'wifi'
  • 'mobile'
  • 'none'
  • 'unknown'

βŒ›οΈ Estimate Network Speed #

final String speed = await NetworkCheckerPlus.getNetworkSpeed();
print('Network Speed: \$speed');

Possible values:

  • "Excellent"
  • "Good"
  • "Moderate"
  • "Poor"
  • "No Connection"

πŸ“Ά Get Signal Strength (Wi-Fi only) #

final int strength = await NetworkCheckerPlus.getSignalStrength();
print('Signal Strength: \$strength/4');

Signal levels range from 0 (Weak) to 4 (Excellent).

⏳ Listen to Connectivity Changes #

NetworkCheckerPlus.connectivityStream.listen((event) {
  print('Connectivity Changed: \$event');
});

Events:

  • 'connected'
  • 'disconnected'

πŸ›‘ Permissions #

πŸ“± Android #

Ensure you add the following permissions in android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

Some features (e.g., signal strength) may require ACCESS_FINE_LOCATION on newer Android versions.


πŸ§ͺ Example #

Clone this repo and run the example app to see it in action:

cd example
flutter run

πŸ’‘ Roadmap #

  • βœ… Check network connection
  • βœ… Detect connection type (Wi-Fi or Mobile)
  • βœ… Estimate basic network speed
  • βœ… Measure Wi-Fi signal strength
  • βœ… Real-time listener for network changes
  • ❌ Support signal strength for mobile networks

πŸ‘₯ Contributing #

We welcome contributions! Whether it’s bug reports, feature requests, documentation, or code β€” all are appreciated.

  1. Fork the repo
  2. Create your feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/my-feature
  5. Open a pull request

πŸ“„ License #

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ’¬ Support #

If you find this plugin helpful, please consider giving it a ⭐ on GitHub and sharing it with other Flutter developers!

Questions? Suggestions? Open an issue


Made with ❀️ for Flutter developers.

2
likes
140
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin to check network connectivity, type, and more.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on network_checker_plus

Packages that implement network_checker_plus