sync_sphere
A Flutter package for constant internet connectivity checking throughout the app.
Features
- Monitors internet connectivity.
- Displays a user-friendly screen when there is no internet connection.
- Customizable options for the internet connectivity screen.
Getting Started
- Add the sync_spherepackage to yourpubspec.yamlfile:
dependencies:
  sync_sphere: ^0.0.3
- Run pub get
flutter pub get
- import your package
import 'package:sync_sphere/sync_sphere.dart';
- Wrap child of your MaterialApp with the SyncSphere widget
void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: SyncSphere(
        child: YourMainScreen(),
        whenOffine: YourOfflineScreenWidget(),
      ),
    );
  }
}
- You can also use the default "No internet" widget
void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: SyncSphere(
        child: YourMainScreen(),
      ),
    );
  }
}