Handle the new enum states
This commit is contained in:
parent
b9619499f5
commit
f96adbc197
1 changed files with 5 additions and 3 deletions
|
@ -282,9 +282,11 @@ class FileUploader {
|
|||
return;
|
||||
}
|
||||
final connectivityResult = await (Connectivity().checkConnectivity());
|
||||
final canUploadUnderCurrentNetworkConditions =
|
||||
(connectivityResult == ConnectivityResult.wifi ||
|
||||
Configuration.instance.shouldBackupOverMobileData());
|
||||
bool canUploadUnderCurrentNetworkConditions = true;
|
||||
if (connectivityResult == ConnectivityResult.mobile) {
|
||||
canUploadUnderCurrentNetworkConditions =
|
||||
Configuration.instance.shouldBackupOverMobileData();
|
||||
}
|
||||
if (!canUploadUnderCurrentNetworkConditions) {
|
||||
throw WiFiUnavailableError();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue