diff --git a/lib/views/settings_notifications.dart b/lib/views/settings_notifications.dart index f9371a382..6b82f7e20 100644 --- a/lib/views/settings_notifications.dart +++ b/lib/views/settings_notifications.dart @@ -189,10 +189,10 @@ class SettingsNotifications extends StatelessWidget { ), ); } - if (!snapshot.hasData) { + if (snapshot.connectionState != ConnectionState.done) { Center(child: CircularProgressIndicator()); } - final pushers = snapshot.data; + final pushers = snapshot.data ?? []; return ListView.builder( physics: NeverScrollableScrollPhysics(), shrinkWrap: true, diff --git a/pubspec.lock b/pubspec.lock index c1fb2a3bc..885e78cc9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,7 +21,7 @@ packages: name: adaptive_page_layout url: "https://pub.dartlang.org" source: hosted - version: "0.2.2" + version: "0.2.3" adaptive_theme: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 86866d4e2..231cc6326 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,7 +33,7 @@ dependencies: url_launcher: ^5.7.10 cached_network_image: ^2.5.0 flutter_local_notifications: ^3.0.3 - adaptive_page_layout: ^0.2.1 + adaptive_page_layout: ^0.2.3 provider: ^4.3.3 adaptive_theme: ^1.1.0 # desktop_notifications: ^0.0.0-dev.4 // Currently blocked by: https://github.com/canonical/desktop_notifications.dart/issues/5