v0.0.3
sync_sphere
sync_sphere 套件設計用於以簡單方式檢查整個應用程式或特定位置的網路連線狀態。只需包裝您想要監聽網路連線的組件,其餘交由我們處理。
4喜歡 13近 30 天下載110Pub 分數
AndroidiOSWebmacOSWindowsLinux
用於檢查連線狀態的 Flutter 套件
^5.0.2{"sdk":"flutter"}^2.0.0{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
A Flutter package for constant internet connectivity checking throughout the app.
sync_sphere package to your pubspec.yaml file:dependencies:
sync_sphere: ^0.0.3
flutter pub get
import 'package:sync_sphere/sync_sphere.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: SyncSphere(
child: YourMainScreen(),
whenOffine: YourOfflineScreenWidget(),
),
);
}
}
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: SyncSphere(
child: YourMainScreen(),
),
);
}
}