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< .resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>() AndroidFlutterLocalNotificationsPlugin>()
?.requestNotificationsPermission(); ?.requestNotificationsPermission();
final bool isConnected = final bool isConnected = !(await Connectivity().checkConnectivity())
await Connectivity().checkConnectivity() != [ConnectivityResult.none]; .contains(ConnectivityResult.none);
if (!isConnected) { if (!isConnected) {
_toast.showBottom(t.homeView.noConnection); _toast.showBottom(t.homeView.noConnection);
} }