whenOnline static method

Future<void> whenOnline({
  1. Duration? timeout,
})

Waits until the device is online (timeout throws TimeoutException). await UNetwork.whenOnline(); upload();

Implementation

static Future<void> whenOnline({Duration? timeout}) => UConnectivity.whenOnline(timeout: timeout);