network_internet_checker
The connectivity package and other similar packages only provides information if there is a network connection, but not if the network is connected to the Internet. That's why the network_internet_c hecker package helps you easily manage widgets dynamically based on the device's internet access.
đ§âđģ Getting started
flutter pub add network_internet_checker
đ ī¸ Usage
Simply import package:network_internet_checker/network_internet_checker.dart'
and simply
pass the Required Parameters
to the widget. It takes a some required parameter such as the child wiget , an onPressed function, etc.
Exemple
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: const Color(0x9f4376f8),
),
home: Scaffold(
body: ConnectivityWidget(
noInternetText: const Text("Check your internet and try again", ),
addIcon: false,
loadingColor: Colors.brown,
textButton: Text("Try Again"),
onButtonPressed: () {
print("Check your internet and try again"); },
child: Center(child: const Text("Working",style: TextStyle(fontSize: 20),)),
),
),
);
}
}
âšī¸ Additional Information
Contribute to this project by making a PR âŦī¸ or creating a new issue đ on GitHub.
Do not hesitate to let a đ on the repo if you find it useful.
đˇ Maintainers
Created & maintained with đ by Similoluwa Ogunleye.
đ License
MIT License
Copyright (c) 2024 Ogunleye-Similoluwa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.