instance property

NetworkReachability get instance

Access the singleton instance of the network reachability service.

Throws an Exception if init has not been called beforehand.

Implementation

static NetworkReachability get instance {
  if (_instance == null) {
    throw Exception(
        'NetworkReachability has not been initialized. Call NetworkReachability.init() first.');
  }
  return _instance!;
}