Skip to content

Heinrich-vanNieuwenhuizen/connection

 
 

Repository files navigation

palestine_connection

Lightweight internet connection test, lookup Google domain.

License Pub Example

PUB GitHub release GitHub stars GitHub forks

Build Status

Table Of Contents

Features

  • Periodic internet connection tests
  • dispose method

Getting started

To start, import package

import 'package:palestine_connection/palestine_connection.dart';

Usage

Just as easy as this

final PalConnection connection = PalConnection();
connection.initialize(
    domain: PalDomain.random, // Domain To Test On (optional)
    periodicInSeconds: 3, // 3 seconds
    onConnectionLost: () {
      // No Internet
    },
    onConnectionRestored: () {
      // Internet is back
    },
  );

It could get more easier actually

PalConnection().initialize(
    periodicInSeconds: 3, // 3 seconds
    onConnectionLost: () {
      // No Internet
    },
    onConnectionRestored: () {
      // Internet is back
    },
  );

Then you could dispose it

connection.dispose();

Contributors

Contributors

About

Lightweight internet connection test, lookup a domain.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 100.0%