mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-22 06:59:21 +01:00
Remove connectivity check on web
It doesn't work at all on web
This commit is contained in:
parent
1460f12762
commit
d72f64d4f4
1 changed files with 6 additions and 0 deletions
|
@ -1,7 +1,13 @@
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:nc_photos/platform/k.dart' as platform_k;
|
||||||
|
|
||||||
Future<void> waitUntilWifi({VoidCallback? onNoWifi}) async {
|
Future<void> waitUntilWifi({VoidCallback? onNoWifi}) async {
|
||||||
|
if (platform_k.isWeb) {
|
||||||
|
// connectivity does NOT work on web, currently it will always return mobile
|
||||||
|
// on Blink, and none on Gecko
|
||||||
|
return;
|
||||||
|
}
|
||||||
while (true) {
|
while (true) {
|
||||||
final result = await Connectivity().checkConnectivity();
|
final result = await Connectivity().checkConnectivity();
|
||||||
if (result == ConnectivityResult.wifi) {
|
if (result == ConnectivityResult.wifi) {
|
||||||
|
|
Loading…
Reference in a new issue