fix: Lack of connectivity toast not showing due to incorrect comparison

Signed-off-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
validcube 2024-08-28 00:26:41 +07:00
parent b769a66d16
commit 81f05e1b19
No known key found for this signature in database
GPG key ID: DBA94253E1D3F267

View file

@ -85,7 +85,7 @@ class HomeViewModel extends BaseViewModel {
AndroidFlutterLocalNotificationsPlugin>()
?.requestNotificationsPermission();
final bool isConnected =
await Connectivity().checkConnectivity() != ConnectivityResult.none;
await Connectivity().checkConnectivity() != [ConnectivityResult.none];
if (!isConnected) {
_toast.showBottom(t.homeView.noConnection);
}
@ -106,7 +106,8 @@ class HomeViewModel extends BaseViewModel {
void navigateToAppInfo(PatchedApplication app, bool isLastPatchedApp) {
_navigationService.navigateTo(
Routes.appInfoView,
arguments: AppInfoViewArguments(app: app, isLastPatchedApp: isLastPatchedApp),
arguments:
AppInfoViewArguments(app: app, isLastPatchedApp: isLastPatchedApp),
);
}