fix: Fix the connectivity check toast again (#2216)

This commit is contained in:
kitadai31 2024-09-17 21:48:05 +09:00 committed by GitHub
parent 0ce23d2d60
commit a7e2281805
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,8 +84,8 @@ class HomeViewModel extends BaseViewModel {
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>()
?.requestNotificationsPermission();
final bool isConnected =
await Connectivity().checkConnectivity() != [ConnectivityResult.none];
final bool isConnected = !(await Connectivity().checkConnectivity())
.contains(ConnectivityResult.none);
if (!isConnected) {
_toast.showBottom(t.homeView.noConnection);
}