sync_sphere 0.0.3 copy "sync_sphere: ^0.0.3" to clipboard
sync_sphere: ^0.0.3 copied to clipboard

The sync_sphere package is designed to check internet connectivity throughout the app or just on a particular location in an easy way. Just wrap the widget you want to listen to internet connectivity [...]

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 #

  1. Add the sync_sphere package to your pubspec.yaml file:
dependencies:
  sync_sphere: ^0.0.3
copied to clipboard
  1. Run pub get
flutter pub get
copied to clipboard
  1. import your package
import 'package:sync_sphere/sync_sphere.dart';
copied to clipboard
  1. 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(),
      ),
    );
  }
}
copied to clipboard
  1. 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(),
      ),
    );
  }
}
copied to clipboard
4
likes
120
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

2024.10.02 - 2025.04.16

The sync_sphere package is designed to check internet connectivity throughout the app or just on a particular location in an easy way. Just wrap the widget you want to listen to internet connectivity and leave the rest to us.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter

More

Packages that depend on sync_sphere