offline_banner 1.0.3 copy "offline_banner: ^1.0.3" to clipboard
offline_banner: ^1.0.3 copied to clipboard

A customizable Flutter widget that shows an animated banner when offline and an online popup when internet is restored, with retry support and configurable position.

📡 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

1
likes
140
points
5
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable Flutter widget that shows an animated banner when offline and an online popup when internet is restored, with retry support and configurable position.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on offline_banner

Packages that implement offline_banner