Disable toast connected network

(cherry picked from commit 9b9ea1fea6ac8dba7864fa07f33d181be9b2d9b3)
This commit is contained in:
dab246
2023-06-15 15:59:31 +07:00
committed by Dat H. Pham
parent 937b8e4d7d
commit 18a17a9ebc
@@ -58,8 +58,6 @@ class NetworkConnectionController extends BaseController {
_setNetworkConnectivityState(result);
if (_isEnableShowToastDisconnection && !isNetworkConnectionAvailable()) {
_showToastLostConnection();
} else if (isNetworkConnectionAvailable()) {
_showToastConnectedToTheNetwork();
} else {
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)
);
}
}
}