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(),
),
);
}
}