network_internet_checker 1.1.0 copy "network_internet_checker: ^1.1.0" to clipboard
network_internet_checker: ^1.1.0 copied to clipboard

A flutter plugin that notifies users when there is no internet connection changes

example/example.dart

// example/example.dart

import 'package:flutter/material.dart';
import 'package:network_internet_checker/network_widget.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: ConnectivityWidget(
        child: HomeScreen(),
        textButton: Text('Retry'),
        noInternetText: Text('No Internet Connection. Please try again.'),
        addIcon: true,
        icon: Icon(Icons.signal_wifi_off),
        onButtonPressed: () {
          // Your onButtonPressed logic here
        },
      ),
    );
  }
}

class HomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Connectivity Checker Example'),
      ),
      body: Center(
        child: Text('You are connected to the internet!'),
      ),
    );
  }
}
3
likes
140
points
8
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin that notifies users when there is no internet connection changes

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, cupertino_icons, flutter, flutter_spinkit

More

Packages that depend on network_internet_checker