network_popup 1.0.1+3 copy "network_popup: ^1.0.1+3" to clipboard
network_popup: ^1.0.1+3 copied to clipboard

A Flutter package that displays a customizable network connectivity popup across all screens when the device goes offline. Perfect for apps that require real-time network status updates.

Network Popup #

A Flutter package that displays a customizable network connectivity popup across all screens when the device goes offline. Perfect for apps that require real-time network status updates.

Features #

  • Real-time network monitoring.
  • Customizable popup design.
  • Works across all screens and navigation flows.
  • Lightweight and easy to integrate.

Installation #

Add the following to your pubspec.yaml:

dependencies: network_popup: ^1.0.+3

Usage #

Wrap your MaterialApp with NetworkOverlay:

import 'package:flutter/material.dart';
import 'package:network_popup/network_popup.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return NetworkOverlay(
child: MaterialApp(
home: Scaffold(
                appBar: AppBar(title: const Text('Network Popup Demo')),
                body: const Center(child: Text('Main Content')),
                ),
            ),
        );
    }
}

Customization #

You can customize the popup and behavior:

NetworkOverlay(
checkInterval: const Duration(seconds: 5),
checkUrl: 'https://your-custom-endpoint.com',
offlinePopup: const CustomPopup(),
onlineCallback: () {
print('Connection restored!');
},
child: MaterialApp(...),
)
3
likes
130
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that displays a customizable network connectivity popup across all screens when the device goes offline. Perfect for apps that require real-time network status updates.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, cupertino_icons, flutter, http

More

Packages that depend on network_popup