https://github.com/programmerhasan/flutter_internet_connection_status
A Flutter package to detect internet connection and show banners
https://github.com/programmerhasan/flutter_internet_connection_status
connectivity flutter internet network online-offline
Last synced: about 1 month ago
JSON representation
A Flutter package to detect internet connection and show banners
- Host: GitHub
- URL: https://github.com/programmerhasan/flutter_internet_connection_status
- Owner: ProgrammerHasan
- License: other
- Created: 2025-08-12T12:17:04.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-08-12T12:57:11.000Z (about 2 months ago)
- Last Synced: 2025-08-12T22:49:04.280Z (about 2 months ago)
- Topics: connectivity, flutter, internet, network, online-offline
- Language: Dart
- Homepage:
- Size: 927 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Internet Connection Status.
A Flutter package to detect internet connection and show banners in your app.
![]()
![]()
---
## Features
- Automatic internet connection detection using connectivity_plus and internet_connection_checker
- Shows online/offline status banners automatically
- Stylish blur glass-effect banners for online/offline status notifications
- Customizable banners via widget or text parameters
- Built with hooks_riverpod and flutter_hooks for reactive and declarative usage---
## Quickstart
### Add dependency to your pubspec file
Add this to your `pubspec.yaml`:
```yaml
dependencies:
internet_connection_status: ^1.0.0
```### Add Internet Connection Status to Your App!
```dart
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:internet_connection_status/internet_connection_status.dart';void main() {
runApp(const ProviderScope(child: MyApp()));
}class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Stack(
children: [
Scaffold(
body: Center(child: Text("Internet Connection Status Example")),
),
InternetConnectionStatus(),
],
)
);
}
}
```# Customization
```
InternetConnectionStatus(
position: InternetConnectionStatusPosition.top
onlineTitle: "অনলাইনে ফিরে এসেছেন",
onlineTitle: "অনলাইনে ফিরে এসেছেন",
onlineSubtitle: "ইন্টারনেট সংযোগ পুনরায় সফল হয়েছে।",
offlineTitle: "আপনি এখন অফলাইনে",
offlineSubtitle: "ইন্টারনেট সংযোগ বিচ্ছিন্ন হয়েছে।",
online: YourCustomOnlineWidget(),
offline: YourCustomOfflineWidget(),
);
```# Public API
- `internetStatusStreamProvider`
StreamProvider — stream of internet connection status- `isInternetConnectedProvider`
Provider — boolean internet connection status (null while loading)- `InternetConnectionStatus` (Widget)
Shows online/offline banners automatically, customizable- `NetworkConnectionStatusCard` (Widget)
Default styled banner card with blur glass effect- `ConnectionStatus` enum
Enum for `connected` and `disconnected`# Platform Setup
Android
Add these permissions to your android/app/src/main/AndroidManifest.xml:
``````
iOS
Add this key to your ios/Runner/Info.plist:
```
com.apple.security.network.server```
Dependencies
```
connectivity_plus
internet_connection_checker
flutter_hooks
hooks_riverpod
```License
MIT License © ProgrammerHasanContributions
Contributions and suggestions are welcome! Feel free to open issues or PRs.Contact
For questions or support, open an issue on GitHub or contact me at programmerhasan.s@gmail.com