Disable toast connected network
(cherry picked from commit 9b9ea1fea6ac8dba7864fa07f33d181be9b2d9b3)
This commit is contained in:
@@ -58,8 +58,6 @@ class NetworkConnectionController extends BaseController {
|
|||||||
_setNetworkConnectivityState(result);
|
_setNetworkConnectivityState(result);
|
||||||
if (_isEnableShowToastDisconnection && !isNetworkConnectionAvailable()) {
|
if (_isEnableShowToastDisconnection && !isNetworkConnectionAvailable()) {
|
||||||
_showToastLostConnection();
|
_showToastLostConnection();
|
||||||
} else if (isNetworkConnectionAvailable()) {
|
|
||||||
_showToastConnectedToTheNetwork();
|
|
||||||
} else {
|
} else {
|
||||||
ToastView.dismiss();
|
ToastView.dismiss();
|
||||||
}
|
}
|
||||||
@@ -96,18 +94,4 @@ class NetworkConnectionController extends BaseController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _showToastConnectedToTheNetwork() {
|
|
||||||
if (currentContext != null && currentOverlayContext != null) {
|
|
||||||
_appToast.showToastMessage(
|
|
||||||
currentOverlayContext!,
|
|
||||||
AppLocalizations.of(currentContext!).connectedToTheInternet,
|
|
||||||
leadingSVGIcon: _imagePaths.icConnectedInternet,
|
|
||||||
backgroundColor: AppColor.primaryColor,
|
|
||||||
textColor: Colors.white,
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12),
|
|
||||||
duration: const Duration(seconds: 5)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user