network_type_reachability 1.2.0
network_type_reachability: ^1.2.0 copied to clipboard
This plugin allows Flutter apps to detect network changes. You can know the detailed mobile network types, such as 2G, 3G, 4G, 5G. This plugin is suitable for iOS and Android, it can also detect if th [...]
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add network_type_reachability
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
network_type_reachability: ^1.2.0
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:network_type_reachability/network_type_reachability.dart';