📡 offline_banner

A simple Flutter plugin to automatically show a banner when the internet is disconnected.

🚀 Features

  • 🔍 Monitors internet connectivity
  • 📢 Displays a red banner when offline with animation
  • 🔁 Retry button integration
  • 🎨 Customizable banner support with animation

📷 Checking Internet Connection:

🚀 Getting Started

1. Add Dependency

Add the following to your pubspec.yaml:

dependencies:
  offline_banner: ^1.0.2
  1. Install Package Run the following command:

flutter pub get

  1. Import the Package
import 'package:offline_banner/offline_banner.dart';

🔧 Usage

OfflineBanner(
  retryCallback: () => fetchData(),
  customBanner: MyCustomBannerWidget(),
  child: MaterialApp(),
);



⚙️ Permissions
🟢 Android Permissions

Add the following permissions in android/app/src/main/AndroidManifest.xml:

``` xml
<uses-permission android:name="android.permission.INTERNET"/>


Add the following permissions in android/app/build.gradle:

android {
    compileSdkVersion 34 // Or latest
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 34
    }
}

🍎 iOS Permissions

Add the following keys to your ios/Runner/Info.plist file:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

📸 Developed by

✅ VENU RENANGI
✅ SONAM GUPTA ✅ KAMNA JOSHI

🤝 Contributors ✅ Shrinath Gavadoji