hasInternet static method

Future<bool> hasInternet({
  1. bool force = false,
  2. Duration timeout = const Duration(seconds: 5),
})

True when the internet really answers (pings your baseUrl + 2 public hosts, cached 5s). if (await UNetwork.hasInternet()) …

Implementation

static Future<bool> hasInternet({bool force = false, Duration timeout = const Duration(seconds: 5)}) => UConnectivity.hasInternet(force: force, timeout: timeout);