flutter_dino
Flutter-Paket zur nahtlosen Behandlung der Internetverbindung mit benutzerdefinierten Widgets.
YudizAndroidKishan/flutter_dino open-source repository details.
{"sdk":"flutter"}^1.20.0^6.0.5{"sdk":"flutter"}^4.0.0Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
GitHub code size
Flutter Dino is a Flutter package that provides seamless internet connectivity handling in your Flutter applications. It allows you to easily manage and customize your app's behavior when internet connectivity changes.
Add the following line to your pubspec.yaml file under dependencies:
dependencies:
flutter_dino: latest_version
Then run:
flutter pub get
To use Flutter Dino in your Flutter application:
import 'package:flutter_dino/flutter_dino.dart';
Here's a simple example of how to integrate Flutter Dino in your app:
import 'package:flutter/material.dart';
import 'package:flutter_dino/flutter_dino.dart';
void main() async {
final navigatorKey = GlobalKey<NavigatorState>();
WidgetsFlutterBinding.ensureInitialized();
await FlutterDino.initialize(
config: FlutterDinoConfig(
navigatorKey: navigatorKey,
),
);
runApp(
MaterialApp(
navigatorKey: navigatorKey,
home: HomePage(),
navigatorObservers: [
FlutterDino.instance.navigatorObserver,
],
),
);
}
You can customize Flutter Dino's behavior using FlutterDinoConfig:
FlutterDinoConfig(
navigatorKey: navigatorKey,
showNoInternetDialog: true, // Control automatic handling
noInternetReplacement: YourCustomWidget(), // Custom UI when offline
)
This project is licensed under the MIT License - see the LICENSE file for details.
| YudizAndroidKishan YudizAndroidKishan 🚇 ⚠️ 💻 |
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository if you would like to contribute to Flutter Dino.
If you encounter any issues or have questions, feel free to open an issue on GitHub.