mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
11 lines
290 B
Dart
11 lines
290 B
Dart
import 'package:connectivity/connectivity.dart';
|
|
|
|
Future<void> waitUntilWifi() async {
|
|
while (true) {
|
|
final result = await Connectivity().checkConnectivity();
|
|
if (result == ConnectivityResult.wifi) {
|
|
return;
|
|
}
|
|
await Future.delayed(const Duration(seconds: 5));
|
|
}
|
|
}
|