Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 901 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 901 Bytes

network_aware

A Flutter package that enables your flutter apps to be network aware. It overlays a widget over your app when internet connection is off. You can choose to allow users interact/dismiss the prompt or block all interactions.

Compatibility

Android and IOS

Usage

Add import statement

    import 'package:network_aware/network_aware.dart';
    

Wrap your root MaterialApp in a [NetworkAware] Widget

    NetworkAware(
      canDismiss: true,
      position: NetworkAwarePosition.TOP, 
      indicatorWidget: IndicatorWidget(), 
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        home: MyHomePage(title: 'NetworkAware Test'),
      ),
    );


//For full example, visit the example app repo