palestine_connection 0.0.21 copy "palestine_connection: ^0.0.21" to clipboard
palestine_connection: ^0.0.21 copied to clipboard

Lightweight internet connection test, lookup any provided domain.

example/palestine_connection_example.dart

import 'dart:developer' as developer;

import 'package:palestine_connection/palestine_connection.dart';

void main() {
  final PalConnection connection = PalConnection();
  connection.initialize(
    domain: PalDomain.google, // Domain To Test On (optional)
    periodicInSeconds: 3, // 3 seconds
    onConnectionLost: () {
      developer.log('No Internet');
    },
    onConnectionRestored: () {
      developer.log('Connection Restored');
    },
  );
}
60
likes
120
pub points
52%
popularity

Publisher

verified publishermsayed.net

Lightweight internet connection test, lookup any provided domain.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

More

Packages that depend on palestine_connection