zeba_academy_connectivity 1.0.0 copy "zeba_academy_connectivity: ^1.0.0" to clipboard
zeba_academy_connectivity: ^1.0.0 copied to clipboard

A Flutter network toolkit for online offline detection and connection monitoring.

Zeba Academy Connectivity #

A powerful and lightweight Flutter network toolkit for monitoring internet connectivity, detecting connection types, and handling offline states.


About Me #

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

You can learn more about me and my work at:

🌐 sufyanism.com

Connect with me on:

šŸ’¼ LinkedIn


Your all-in-one learning hub! #

šŸš€ Explore courses and resources in coding, tech, and development at:

🌐 zeba.academy
šŸ’» code.zeba.academy

Empower yourself with practical skills through curated tutorials, real-world projects, and hands-on experience.

Level up your tech journey today! šŸ’»āœØ


About Zeba Academy Connectivity #

Zeba Academy Connectivity is a Flutter network toolkit designed to simplify connectivity handling in mobile applications.

It provides:

  • Online/offline detection
  • Connection type monitoring
  • Real-time network watcher
  • Offline UI banners
  • Stream-based connectivity updates

Built for developers who need reliable network awareness in Flutter apps.


Features #

āœ… Internet connectivity detection
āœ… Real-time network monitoring
āœ… WiFi detection
āœ… Mobile data detection
āœ… Ethernet detection
āœ… Offline mode detection
āœ… Reactive Stream API
āœ… Offline banner widget
āœ… Lightweight architecture
āœ… Easy integration
āœ… Null-safe Flutter package


Installation #

Add this package to your pubspec.yaml:

dependencies:
  zeba_academy_connectivity: ^1.0.0

Then run:

flutter pub get

Usage #

Import the package:

import 'package:zeba_academy_connectivity/zeba_academy_connectivity.dart';

Check Internet Status #

final connectivity =
    ZebaAcademyConnectivity();


final online =
    await connectivity.isOnline;


print(
  online
);

Output:

true

Listen For Network Changes #

final connectivity =
    ZebaAcademyConnectivity();


connectivity.statusStream.listen(
(status) {

  print(
    status.isOnline
  );

  print(
    status.type
  );

});

Example output:

Online: true
Type: ConnectionType.wifi

Connection Types #

Supported connection types:

ConnectionType.wifi

ConnectionType.mobile

ConnectionType.ethernet

ConnectionType.bluetooth

ConnectionType.none

ConnectionType.unknown

Offline Banner #

Automatically show an offline banner:

ZebaOfflineBanner(

child:

Scaffold(

body:

Center(

child:

Text(
"Home Screen"
),

),

),

);

When the internet disconnects:

No Internet Connection

will appear automatically.


Example #

import 'package:flutter/material.dart';

import 'package:zeba_academy_connectivity/
zeba_academy_connectivity.dart';


class HomePage extends StatelessWidget {

const HomePage({super.key});


@override
Widget build(BuildContext context){

return ZebaOfflineBanner(

child:

Scaffold(

appBar:

AppBar(
title:
Text(
"Connectivity Demo"
),
),


body:

Center(

child:

Text(
"Zeba Academy"
),

),

),

);

}

}

API #

ZebaAcademyConnectivity #

Main connectivity manager.

Properties #

Property Description
statusStream Network change stream
currentStatus Current connection state
isOnline Checks internet availability

ConnectivityStatus #

Contains network information.

ConnectivityStatus(
isOnline: true,
type: ConnectionType.wifi
)

ConnectionType #

Available values:

  • wifi
  • mobile
  • ethernet
  • bluetooth
  • none
  • unknown

Requirements #

Flutter:

>=3.10.0

Dart:

>=3.0.0

Contributing #

Contributions are welcome!

Steps:

  1. Fork the repository
  2. Create your feature branch
git checkout -b feature/new-feature
  1. Commit changes
git commit -m "Add new feature"
  1. Push branch
git push origin feature/new-feature
  1. Create Pull Request

Issues #

If you find a bug or have suggestions, please open an issue in the repository.


License #

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

You are free to use, modify, and distribute this package under the terms of the GPL license.


Zeba Academy #

Zeba Academy is a learning platform dedicated to:

  • Coding
  • Technology
  • Development
  • Practical programming skills

Visit:

āž” Main website:
https://zeba.academy

āž” Courses and resources:
https://code.zeba.academy

āž” YouTube tutorials:
https://www.youtube.com/@zeba.academy

āž” Instagram:
https://www.instagram.com/zeba.academy/


Thank You #

Thank you for using Zeba Academy Connectivity šŸ’™

Happy Coding šŸš€

0
likes
130
points
105
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A Flutter network toolkit for online offline detection and connection monitoring.

Homepage

License

GPL-3.0 (license)

Dependencies

connectivity_plus, flutter

More

Packages that depend on zeba_academy_connectivity