Connection Notifier - A simple way to notify your user about the connection status.

Overview

Connection Notifier

A simple way to notify your user about the connection status.

Basic Usage: ConnectionNotifier

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ConnectionNotifier(    /// Wrap [MaterialApp] with [ConnectionNotifier], and that is it!
      child: MaterialApp(
        title: 'Connection Notifier Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: const MyHomePage(),
      ),
    );
  }
}

ConnectionNotifierToggler

If you want to toggle between some widgets automatically based on connection state.

ConnectionNotifierToggler(
        onConnectionStatusChanged: (connected) {
          /// that means it is still in the initialization phase.
          if (connected == null) return;
          print(connected);
        },
        connected: Center(
          key: UniqueKey(),
          child: const Text(
            'Connected',
            style: TextStyle(
              color: Colors.green,
              fontSize: 48,
            ),
          ),
        ),
        disconnected: Center(
          key: UniqueKey(),
          child: const Text(
            'Disconnected',
            style: TextStyle(
              color: Colors.red,
              fontSize: 48,
            ),
          ),
        ),
      );

Check anywhere inside UI for internet connection

 ConnectionNotifierManager.isConnected(context); // you need to check if it is null (it will be null in initialization phase only).
You might also like...

Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flutter app.

Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flutter app.

Flutter Tutorial - User Profile Page UI #2 Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flu

Dec 15, 2022

Cloud storage status

Cloud storage status

cloud_storage_status Get me a coffee: Bitcoin Address: 1DiFn7B9APaQJKfYAKqesnGM2eVM1MW6U Ethereum Address: 0xAdc43dadbE2b64DC9ba1c8766764F7cD4a2Fa915

Jul 23, 2021

Status Alert for Flutter

 Status Alert for Flutter

Status Alert for Flutter

Jan 8, 2023

This is my way to build a Tagged Search Field that display a list with suggestions while the user type.

This is my way to build a Tagged Search Field that display a list with suggestions while the user type.

tagged_search_field This is my way to build a Tagged Search Field that display a list with suggestions while the user type. A regular search field at

Nov 5, 2021

Full screen menu for Flutter apps to give a user a broad variety of variants in beautiful way

Full screen menu for Flutter apps to give a user a broad variety of variants in beautiful way

Full screen menu for Flutter apps to give a user a broad variety of variants in beautiful way

Dec 14, 2022

Movies4u app UI is simple enough to use and the app is a fun way to get an overview of your movie experience. This repo created with help of awesome UI, material Design and latest feature. this repo contain major feature like : dark theme.

Movies4u app UI is simple enough to use and the app is a fun way to get an overview of your movie experience. This repo created with help of awesome UI, material Design and latest feature. this repo contain major feature like : dark theme.

Moviesfree4U This is simple repository, that help in fetch latest, upcomming movies. Website https://movies4u-ef56f.firebaseapp.com/#/ https://movies4

Dec 10, 2022

Lightweight internet connection test, lookup a domain.

palestine_connection Lightweight internet connection test, lookup Google domain. Part of PalestineDevelopers project Features Periodic internet connec

Jun 26, 2022

Flutter App Check Network connection State with Getx

flutter_network_connection A Flutter project Checking Network Status of a App. Info This project is a networking status checking Flutter application.

Oct 28, 2022

A pure Dart utility library that checks for an internet connection by opening a socket to a list of specified addresses, each with individual port and timeout. Defaults are provided for convenience.

data_connection_checker A pure Dart utility library that checks for an internet connection by opening a socket to a list of specified addresses, each

Nov 29, 2022
Owner
haptome
🚩 UI/UX designer . 🚩 Interaction designer. 🚩 Frontend Developer (Flutter Dart developer).
haptome
Status Stepper: Use this package for showing status changing

status_stepper Use this package for showing status changing. For now available o

Progressive Mobile 0 Jan 11, 2022
Custom_Empty widget is flutter plugin which is designed to notify user about some event.

Empty Widget Custom_Empty widget is flutter custom widget which is designed to notify user about some event. Screenshots Screenshots Screenshots Scree

Sonu Sharma 66 Nov 17, 2022
Flutter Dropdown Alert help to notify to user when success, warning or error like push notification

flutter_dropdown_alert A dropdown alert package for flutter Dropdown alert will help to notify to user when you call api success, error or something l

Tuan Van Le 12 Dec 17, 2022
A Flutter widget that checks and displays the version status of application and you can easily guide user to update your app

A most easily usable Flutter widget about application version check! 1. About 1.

Kato Shinya 1 Dec 16, 2021
To Do App help me to remember my tasks , notify me .

todoapp A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Ahmed Hossny 1 Jan 10, 2022
null 1 Jan 20, 2022
The simple way to show the user some information on your selected widget.

Info Popup The simple way to show the user some information on your selected widget. Features Info holder with dynamic size Fully editable content are

Salih Can 9 Nov 23, 2022
The easiest way to create your animated splash screen in a fully customizable way.

Animated Splash Screen Check it out at Pub.Dev Do it your way Assets image Custom Widget Url image IconData Or just change PageTransition and/or Splas

Clean Code 104 Nov 10, 2022
Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flutter app.

Flutter Tutorial - User Profile Page UI 1/2 Create a Flutter User Profile Page UI where you can access and edit your user's information within your Fl

Johannes Milke 46 Dec 6, 2022