ConnectivityChecker constructor

ConnectivityChecker({
  1. int refresh = 10,
  2. String domain = 'example.com',
})

Can be used to check whether there is internet connection to this device or not.

This simply send periodic signals to a given domain and if the requests were sent successfully this will add true to the stream. If connection was unsuccessful, this will add false to the stream.

Make sure to call close after using this instance.

Implementation

ConnectivityChecker({
  this.refresh = 10,
  this.domain = 'example.com',
});