FLUTTER ECOSYSTEM

DarkNinja15/sync_sphere

接続状態を確認するためのFlutterパッケージ

sync_sphere のプロジェクト画像
Stars
2
Forks
0
最終プッシュ(UTC)
2024/03/18
プロジェクト状態
公開中
Animesh Shukla GitHub avatar
GITHUB User

Animesh Shukla ↗

Writing code that almost compiles itself.

言語Dart

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 4 件

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

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
  1. Run pub get
flutter pub get
  1. import your package
import 'package:sync_sphere/sync_sphere.dart';
  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(),
      ),
    );
  }
}
  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(),
      ),
    );
  }
}