Internet Check-In App

A comprehensive Flutter package for handling internet connectivity status in your application. It provides a simple, plug-and-play solution to monitor network changes and automatically display a "No Internet" screen when the connection is lost.

pub package License: MIT

Features

  • Real-time Monitoring: Instantly detects when internet connectivity is lost or restored.
  • Automatic UI Handling: Automatically navigates to a "No Internet" screen when disconnected and returns to the previous screen when connected.
  • Customizable: Use the default "No Internet" screen or provide your own custom widget.
  • Cross-Platform: Supports Android, iOS, Windows, and Web.

UI Examples

Connected State No Internet State

Getting Started

Add the package to your pubspec.yaml file:

dependencies:
  internet_check_in_app: ^0.0.1

Or install it via command line:

flutter pub add internet_check_in_app

Usage

Wrap your application's home or main widget with ConnectivityListener. This widget handles the navigation logic based on connectivity status.

Basic Usage

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

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Connectivity App',
      home: ConnectivityListener(
        child: HomePage(), // Your main app screen
      ),
    );
  }
}

Custom "No Internet" Screen

You can provide a custom widget to be displayed when the internet connection is lost:

ConnectivityListener(
  noInternetWidget: MyCustomNoInternetPage(),
  child: HomePage(),
)

Platform Support

Platform Support
Android ✅
iOS ✅
Windows ✅
Web ✅
macOS ✅
Linux ✅

This package relies on connectivity_plus, so it supports all platforms supported by that plugin.

Contributing

Contributions are welcome! If you find a bug or want to feature, please open an issue or submit a pull request on the GitHub repository.