This plugin allows Flutter applications to detect network changes. You can know the detailed mobile network types such as 2G, 3G, 4G, 5G. This plug-in is suitable for iOS and Android. ##Usage

  1. get current networkstatus ** Note: Android must dynamically obtain the READ_PHONE_STATE permission to judge 2G/3G/4G/5G**
    if(Platform.isAndroid) {
      await Permission.phone.request();
    NetworkStatus status = await FlutterReachbility().currentNetworkStatus();
    switch(status) {
      case NetworkStatus.unreachable:
      case NetworkStatus.wifi:
      case NetworkStatus.mobile2G:
      case NetworkStatus.moblie3G:
      case NetworkStatus.moblie4G:
      case NetworkStatus.moblie5G:
      case NetworkStatus.otherMoblie:
  1. You can also listen for network state changes by subscribing to the stream exposed by flutter_reachability plugin
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter_reachability/flutter_reachability.dart';
import 'package:permission_handler/permission_handler.dart';

void main() {

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  String _networkStatus = 'Unknown';
  StreamSubscription<NetworkStatus> subscription;

  void initState() {

  _listenNetworkStatus()async {
    if(Platform.isAndroid) {
      await Permission.phone.request();
    subscription = FlutterReachbility().onNetworkStateChanged.listen((event) {

      setState(() {
        _networkStatus = "${event}";

  void dispose() {
    // TODO: implement dispose

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.