diff --git a/packages/neon/neon/lib/src/pages/account_settings.dart b/packages/neon/neon/lib/src/pages/account_settings.dart index f6bbf4d8..bcb694e9 100644 --- a/packages/neon/neon/lib/src/pages/account_settings.dart +++ b/packages/neon/neon/lib/src/pages/account_settings.dart @@ -13,7 +13,7 @@ import 'package:neon/src/settings/widgets/settings_category.dart'; import 'package:neon/src/settings/widgets/settings_list.dart'; import 'package:neon/src/theme/dialog.dart'; import 'package:neon/src/utils/confirmation_dialog.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; import 'package:nextcloud/nextcloud.dart'; @@ -104,7 +104,7 @@ class AccountSettingsPage extends StatelessWidget { ), ), ], - NeonException( + NeonError( userDetails.error, onRetry: userDetailsBloc.refresh, ), diff --git a/packages/neon/neon/lib/src/pages/home.dart b/packages/neon/neon/lib/src/pages/home.dart index 44c5c057..2ff64712 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -14,7 +14,7 @@ import 'package:neon/src/utils/global_popups.dart'; import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/widgets/app_bar.dart'; import 'package:neon/src/widgets/drawer.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/unified_search_results.dart'; import 'package:provider/provider.dart'; @@ -91,7 +91,7 @@ class _HomePageState extends State { debugPrint(e.toString()); debugPrint(s.toString()); if (mounted) { - NeonException.showSnackbar(context, e); + NeonError.showSnackbar(context, e); } } } diff --git a/packages/neon/neon/lib/src/pages/login_check_account.dart b/packages/neon/neon/lib/src/pages/login_check_account.dart index 31b8f775..0cb672f4 100644 --- a/packages/neon/neon/lib/src/pages/login_check_account.dart +++ b/packages/neon/neon/lib/src/pages/login_check_account.dart @@ -12,7 +12,7 @@ import 'package:neon/src/router.dart'; import 'package:neon/src/theme/dialog.dart'; import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/widgets/account_tile.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/validation_tile.dart'; @internal @@ -68,7 +68,7 @@ class _LoginCheckAccountPageState extends State { if (state.hasError) ...[ Builder( builder: (final context) { - final details = NeonException.getDetails(context, state.error); + final details = NeonError.getDetails(context, state.error); return NeonValidationTile( title: details.isUnauthorized ? AppLocalizations.of(context).errorCredentialsForAccountNoLongerMatch @@ -91,7 +91,7 @@ class _LoginCheckAccountPageState extends State { const HomeRoute().go(context); } : () { - if (state.hasError && NeonException.getDetails(context, state.error).isUnauthorized) { + if (state.hasError && NeonError.getDetails(context, state.error).isUnauthorized) { Navigator.pop(context); return; } diff --git a/packages/neon/neon/lib/src/pages/login_check_server_status.dart b/packages/neon/neon/lib/src/pages/login_check_server_status.dart index aee497a2..5c59c2ea 100644 --- a/packages/neon/neon/lib/src/pages/login_check_server_status.dart +++ b/packages/neon/neon/lib/src/pages/login_check_server_status.dart @@ -6,7 +6,7 @@ import 'package:neon/src/bloc/result_builder.dart'; import 'package:neon/src/blocs/login_check_server_status.dart'; import 'package:neon/src/router.dart'; import 'package:neon/src/theme/dialog.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/validation_tile.dart'; import 'package:nextcloud/nextcloud.dart'; @@ -67,7 +67,7 @@ class _LoginCheckServerStatusPageState extends State children: [ if (state.hasError) ...[ NeonValidationTile( - title: NeonException.getDetails(context, state.error).text, + title: NeonError.getDetails(context, state.error).text, state: ValidationState.failure, ), ], diff --git a/packages/neon/neon/lib/src/pages/login_flow.dart b/packages/neon/neon/lib/src/pages/login_flow.dart index 99fef108..e7144ae4 100644 --- a/packages/neon/neon/lib/src/pages/login_flow.dart +++ b/packages/neon/neon/lib/src/pages/login_flow.dart @@ -4,7 +4,7 @@ import 'package:neon/l10n/localizations.dart'; import 'package:neon/src/bloc/result_builder.dart'; import 'package:neon/src/blocs/login_flow.dart'; import 'package:neon/src/router.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; import 'package:url_launcher/url_launcher_string.dart'; @@ -68,7 +68,7 @@ class _LoginFlowPageState extends State { NeonLinearProgressIndicator( visible: init.isLoading, ), - NeonException( + NeonError( init.error, onRetry: bloc.refresh, ), diff --git a/packages/neon/neon/lib/src/pages/login_qr_code.dart b/packages/neon/neon/lib/src/pages/login_qr_code.dart index 2446dbbc..27bd88ba 100644 --- a/packages/neon/neon/lib/src/pages/login_qr_code.dart +++ b/packages/neon/neon/lib/src/pages/login_qr_code.dart @@ -4,7 +4,7 @@ import 'package:meta/meta.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/router.dart'; import 'package:neon/src/utils/exceptions.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; @internal class LoginQRcodePage extends StatefulWidget { @@ -53,7 +53,7 @@ class _LoginQRcodePageState extends State { debugPrint(s.toString()); _lastErrorURL = url; - NeonException.showSnackbar(context, e); + NeonError.showSnackbar(context, e); } } }, diff --git a/packages/neon/neon/lib/src/pages/settings.dart b/packages/neon/neon/lib/src/pages/settings.dart index 878e8247..d4b4cd42 100644 --- a/packages/neon/neon/lib/src/pages/settings.dart +++ b/packages/neon/neon/lib/src/pages/settings.dart @@ -23,7 +23,7 @@ import 'package:neon/src/utils/confirmation_dialog.dart'; import 'package:neon/src/utils/global_options.dart'; import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/utils/save_file.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:url_launcher/url_launcher_string.dart'; @@ -287,7 +287,7 @@ class _SettingsPageState extends State { debugPrint(e.toString()); debugPrint(s.toString()); if (mounted) { - NeonException.showSnackbar(context, e); + NeonError.showSnackbar(context, e); } } }, @@ -312,7 +312,7 @@ class _SettingsPageState extends State { if (!result.files.single.path!.endsWith('.json')) { if (mounted) { - NeonException.showSnackbar( + NeonError.showSnackbar( context, AppLocalizations.of(context).settingsImportWrongFileExtension, ); @@ -325,7 +325,7 @@ class _SettingsPageState extends State { debugPrint(e.toString()); debugPrint(s.toString()); if (mounted) { - NeonException.showSnackbar(context, e); + NeonError.showSnackbar(context, e); } } }, diff --git a/packages/neon/neon/lib/src/widgets/account_tile.dart b/packages/neon/neon/lib/src/widgets/account_tile.dart index 923e550d..559dc1b9 100644 --- a/packages/neon/neon/lib/src/widgets/account_tile.dart +++ b/packages/neon/neon/lib/src/widgets/account_tile.dart @@ -4,7 +4,7 @@ import 'package:neon/src/bloc/result_builder.dart'; import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/utils/provider.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; import 'package:neon/src/widgets/user_avatar.dart'; import 'package:nextcloud/nextcloud.dart'; @@ -79,7 +79,7 @@ class NeonAccountTile extends StatelessWidget { const SizedBox( width: 5, ), - NeonException( + NeonError( userDetails.error, onlyIcon: true, iconSize: 24, diff --git a/packages/neon/neon/lib/src/widgets/app_bar.dart b/packages/neon/neon/lib/src/widgets/app_bar.dart index 25408ba7..d2ece2c6 100644 --- a/packages/neon/neon/lib/src/widgets/app_bar.dart +++ b/packages/neon/neon/lib/src/widgets/app_bar.dart @@ -12,7 +12,7 @@ import 'package:neon/src/models/notifications_interface.dart'; import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/widgets/account_switcher_button.dart'; import 'package:neon/src/widgets/app_implementation_icon.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; import 'package:provider/provider.dart'; import 'package:rxdart/rxdart.dart'; @@ -89,7 +89,7 @@ class _NeonAppBarState extends State { const SizedBox( width: 8, ), - NeonException( + NeonError( appImplementations.error, onRetry: appsBloc.refresh, onlyIcon: true, diff --git a/packages/neon/neon/lib/src/widgets/cached_image.dart b/packages/neon/neon/lib/src/widgets/cached_image.dart index 11de17d9..d979ef2d 100644 --- a/packages/neon/neon/lib/src/widgets/cached_image.dart +++ b/packages/neon/neon/lib/src/widgets/cached_image.dart @@ -9,7 +9,7 @@ import 'package:neon/nextcloud.dart'; import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/utils/provider.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; typedef CacheReviver = FutureOr Function(CacheManager cacheManager); @@ -182,7 +182,7 @@ class _NeonCachedImageState extends State { Widget _buildError(final dynamic error) => widget.errorBuilder?.call(context, error) ?? - NeonException( + NeonError( error, onRetry: () { setState(() {}); diff --git a/packages/neon/neon/lib/src/widgets/drawer.dart b/packages/neon/neon/lib/src/widgets/drawer.dart index 5fa594be..8eea8854 100644 --- a/packages/neon/neon/lib/src/widgets/drawer.dart +++ b/packages/neon/neon/lib/src/widgets/drawer.dart @@ -11,7 +11,7 @@ import 'package:neon/src/router.dart'; import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/widgets/cached_image.dart'; import 'package:neon/src/widgets/drawer_destination.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; import 'package:nextcloud/nextcloud.dart'; @@ -131,7 +131,7 @@ class NeonDrawerHeader extends StatelessWidget { } if (capabilities.hasError) { - return NeonException( + return NeonError( capabilities.error, onRetry: capabilitiesBloc.refresh, ); diff --git a/packages/neon/neon/lib/src/widgets/exception.dart b/packages/neon/neon/lib/src/widgets/error.dart similarity index 81% rename from packages/neon/neon/lib/src/widgets/exception.dart rename to packages/neon/neon/lib/src/widgets/error.dart index ff1cd0aa..5fe1d0ba 100644 --- a/packages/neon/neon/lib/src/widgets/exception.dart +++ b/packages/neon/neon/lib/src/widgets/error.dart @@ -11,9 +11,9 @@ import 'package:neon/src/utils/exceptions.dart'; import 'package:neon/src/utils/provider.dart'; import 'package:nextcloud/nextcloud.dart'; -class NeonException extends StatelessWidget { - const NeonException( - this.exception, { +class NeonError extends StatelessWidget { + const NeonError( + this.error, { required this.onRetry, this.onlyIcon = false, this.iconSize, @@ -21,14 +21,14 @@ class NeonException extends StatelessWidget { super.key, }); - final dynamic exception; + final dynamic error; final VoidCallback onRetry; final bool onlyIcon; final double? iconSize; final Color? color; - static void showSnackbar(final BuildContext context, final dynamic exception) { - final details = getDetails(context, exception); + static void showSnackbar(final BuildContext context, final dynamic error) { + final details = getDetails(context, error); ScaffoldMessenger.of(context).showSnackBar( SnackBar( @@ -45,11 +45,11 @@ class NeonException extends StatelessWidget { @override Widget build(final BuildContext context) { - if (exception == null) { + if (error == null) { return const SizedBox(); } - final details = getDetails(context, exception); + final details = getDetails(context, error); final color = this.color ?? Theme.of(context).colorScheme.error; final errorIcon = Icon( @@ -111,71 +111,71 @@ class NeonException extends StatelessWidget { } @internal - static ExceptionDetails getDetails(final BuildContext context, final dynamic exception) { - if (exception is String) { + static ExceptionDetails getDetails(final BuildContext context, final dynamic error) { + if (error is String) { return ExceptionDetails( - text: exception, + text: error, ); } - if (exception is MissingPermissionException) { + if (error is MissingPermissionException) { return ExceptionDetails( - text: AppLocalizations.of(context).errorMissingPermission(exception.permission.toString().split('.')[1]), + text: AppLocalizations.of(context).errorMissingPermission(error.permission.toString().split('.')[1]), ); } - if (exception is UnableToOpenFileException) { + if (error is UnableToOpenFileException) { return ExceptionDetails( text: AppLocalizations.of(context).errorUnableToOpenFile, ); } - if (exception is InvalidQRcodeException) { + if (error is InvalidQRcodeException) { return ExceptionDetails( text: AppLocalizations.of(context).errorInvalidQRcode, ); } - if (exception is DynamiteApiException) { - if (exception.statusCode == 401) { + if (error is DynamiteApiException) { + if (error.statusCode == 401) { return ExceptionDetails( text: AppLocalizations.of(context).errorCredentialsForAccountNoLongerMatch, isUnauthorized: true, ); } - if (exception.statusCode >= 500 && exception.statusCode <= 599) { + if (error.statusCode >= 500 && error.statusCode <= 599) { return ExceptionDetails( text: AppLocalizations.of(context).errorServerHadAProblemProcessingYourRequest, ); } } - if (exception is SocketException) { + if (error is SocketException) { return ExceptionDetails( - text: exception.address != null - ? AppLocalizations.of(context).errorUnableToReachServerAt(exception.address!.host) + text: error.address != null + ? AppLocalizations.of(context).errorUnableToReachServerAt(error.address!.host) : AppLocalizations.of(context).errorUnableToReachServer, ); } - if (exception is ClientException) { + if (error is ClientException) { return ExceptionDetails( - text: exception.uri != null - ? AppLocalizations.of(context).errorUnableToReachServerAt(exception.uri!.host) + text: error.uri != null + ? AppLocalizations.of(context).errorUnableToReachServerAt(error.uri!.host) : AppLocalizations.of(context).errorUnableToReachServer, ); } - if (exception is HttpException) { + if (error is HttpException) { return ExceptionDetails( - text: exception.uri != null - ? AppLocalizations.of(context).errorUnableToReachServerAt(exception.uri!.host) + text: error.uri != null + ? AppLocalizations.of(context).errorUnableToReachServerAt(error.uri!.host) : AppLocalizations.of(context).errorUnableToReachServer, ); } - if (exception is TimeoutException) { + if (error is TimeoutException) { return ExceptionDetails( text: AppLocalizations.of(context).errorConnectionTimedOut, ); diff --git a/packages/neon/neon/lib/src/widgets/list_view.dart b/packages/neon/neon/lib/src/widgets/list_view.dart index c33aae02..64015e4d 100644 --- a/packages/neon/neon/lib/src/widgets/list_view.dart +++ b/packages/neon/neon/lib/src/widgets/list_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; class NeonListView extends StatelessWidget { @@ -47,7 +47,7 @@ class NeonListView extends StatelessWidget { padding: withFloatingActionButton ? const EdgeInsets.only(bottom: 88) : null, children: [ ...?topScrollingChildren, - NeonException( + NeonError( error, onRetry: onRefresh, ), diff --git a/packages/neon/neon/lib/src/widgets/unified_search_results.dart b/packages/neon/neon/lib/src/widgets/unified_search_results.dart index b3a419fc..1cad5370 100644 --- a/packages/neon/neon/lib/src/widgets/unified_search_results.dart +++ b/packages/neon/neon/lib/src/widgets/unified_search_results.dart @@ -10,7 +10,7 @@ import 'package:neon/src/models/account.dart'; import 'package:neon/src/theme/sizes.dart'; import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/widgets/cached_image.dart'; -import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/error.dart'; import 'package:neon/src/widgets/image_wrapper.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; import 'package:neon/src/widgets/list_view.dart'; @@ -66,7 +66,7 @@ class NeonUnifiedSearchResults extends StatelessWidget { provider.name, style: Theme.of(context).textTheme.headlineSmall, ), - NeonException( + NeonError( result.error, onRetry: bloc.refresh, ), diff --git a/packages/neon/neon/lib/widgets.dart b/packages/neon/neon/lib/widgets.dart index 09d78aee..bbd2556b 100644 --- a/packages/neon/neon/lib/widgets.dart +++ b/packages/neon/neon/lib/widgets.dart @@ -1,6 +1,6 @@ export 'package:neon/src/widgets/cached_image.dart'; export 'package:neon/src/widgets/dialog.dart'; -export 'package:neon/src/widgets/exception.dart' hide ExceptionDetails; +export 'package:neon/src/widgets/error.dart' hide ExceptionDetails; export 'package:neon/src/widgets/image_wrapper.dart'; export 'package:neon/src/widgets/linear_progress_indicator.dart'; export 'package:neon/src/widgets/list_view.dart'; diff --git a/packages/neon/neon_files/lib/pages/main.dart b/packages/neon/neon_files/lib/pages/main.dart index 1dad7796..ca993fe0 100644 --- a/packages/neon/neon_files/lib/pages/main.dart +++ b/packages/neon/neon_files/lib/pages/main.dart @@ -18,7 +18,7 @@ class _FilesMainPageState extends State { bloc = NeonProvider.of(context); bloc.errors.listen((final error) { - NeonException.showSnackbar(context, error); + NeonError.showSnackbar(context, error); }); } diff --git a/packages/neon/neon_files/lib/widgets/browser_view.dart b/packages/neon/neon_files/lib/widgets/browser_view.dart index f1f6d140..cc77c376 100644 --- a/packages/neon/neon_files/lib/widgets/browser_view.dart +++ b/packages/neon/neon_files/lib/widgets/browser_view.dart @@ -34,7 +34,7 @@ class _FilesBrowserViewState extends State { @override void initState() { widget.bloc.errors.listen((final error) { - NeonException.showSnackbar(context, error); + NeonError.showSnackbar(context, error); }); super.initState(); diff --git a/packages/neon/neon_news/lib/dialogs/add_feed.dart b/packages/neon/neon_news/lib/dialogs/add_feed.dart index 4c640a29..d212fe38 100644 --- a/packages/neon/neon_news/lib/dialogs/add_feed.dart +++ b/packages/neon/neon_news/lib/dialogs/add_feed.dart @@ -73,7 +73,7 @@ class _NewsAddFeedDialogState extends State { ), if (widget.folderID == null) ...[ Center( - child: NeonException( + child: NeonError( folders.error, onRetry: widget.bloc.refresh, ), diff --git a/packages/neon/neon_news/lib/pages/article.dart b/packages/neon/neon_news/lib/pages/article.dart index 43a61870..48e0f4f5 100644 --- a/packages/neon/neon_news/lib/pages/article.dart +++ b/packages/neon/neon_news/lib/pages/article.dart @@ -30,7 +30,7 @@ class _NewsArticlePageState extends State { super.initState(); widget.bloc.errors.listen((final error) { - NeonException.showSnackbar(context, error); + NeonError.showSnackbar(context, error); }); WidgetsBinding.instance.addPostFrameCallback((final _) { diff --git a/packages/neon/neon_news/lib/pages/main.dart b/packages/neon/neon_news/lib/pages/main.dart index e3390279..65e90c6a 100644 --- a/packages/neon/neon_news/lib/pages/main.dart +++ b/packages/neon/neon_news/lib/pages/main.dart @@ -19,7 +19,7 @@ class _NewsMainPageState extends State { bloc = NeonProvider.of(context); bloc.errors.listen((final error) { - NeonException.showSnackbar(context, error); + NeonError.showSnackbar(context, error); }); } diff --git a/packages/neon/neon_news/lib/widgets/articles_view.dart b/packages/neon/neon_news/lib/widgets/articles_view.dart index f14bad91..4a31fcc3 100644 --- a/packages/neon/neon_news/lib/widgets/articles_view.dart +++ b/packages/neon/neon_news/lib/widgets/articles_view.dart @@ -20,7 +20,7 @@ class _NewsArticlesViewState extends State { super.initState(); widget.bloc.errors.listen((final error) { - NeonException.showSnackbar(context, error); + NeonError.showSnackbar(context, error); }); } diff --git a/packages/neon/neon_notes/lib/dialogs/create_note.dart b/packages/neon/neon_notes/lib/dialogs/create_note.dart index fd3d8598..fc99c4c6 100644 --- a/packages/neon/neon_notes/lib/dialogs/create_note.dart +++ b/packages/neon/neon_notes/lib/dialogs/create_note.dart @@ -55,7 +55,7 @@ class _NotesCreateNoteDialogState extends State { ), if (widget.category == null) ...[ Center( - child: NeonException( + child: NeonError( notes.error, onRetry: widget.bloc.refresh, ), diff --git a/packages/neon/neon_notes/lib/dialogs/select_category.dart b/packages/neon/neon_notes/lib/dialogs/select_category.dart index 2cec920e..e8d8c956 100644 --- a/packages/neon/neon_notes/lib/dialogs/select_category.dart +++ b/packages/neon/neon_notes/lib/dialogs/select_category.dart @@ -37,7 +37,7 @@ class _NotesSelectCategoryDialogState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Center( - child: NeonException( + child: NeonError( notes.error, onRetry: widget.bloc.refresh, ), diff --git a/packages/neon/neon_notes/lib/utils/exception_handler.dart b/packages/neon/neon_notes/lib/utils/exception_handler.dart index 82e982c7..d658f1c3 100644 --- a/packages/neon/neon_notes/lib/utils/exception_handler.dart +++ b/packages/neon/neon_notes/lib/utils/exception_handler.dart @@ -2,8 +2,8 @@ part of '../neon_notes.dart'; void handleNotesException(final BuildContext context, final Object error) { if (error is DynamiteApiException && error.statusCode == 412) { - NeonException.showSnackbar(context, AppLocalizations.of(context).errorChangedOnServer); + NeonError.showSnackbar(context, AppLocalizations.of(context).errorChangedOnServer); } else { - NeonException.showSnackbar(context, error); + NeonError.showSnackbar(context, error); } } diff --git a/packages/neon/neon_notifications/lib/pages/main.dart b/packages/neon/neon_notifications/lib/pages/main.dart index 84add132..34d2b4cd 100644 --- a/packages/neon/neon_notifications/lib/pages/main.dart +++ b/packages/neon/neon_notifications/lib/pages/main.dart @@ -19,7 +19,7 @@ class _NotificationsMainPageState extends State { bloc = NeonProvider.of(context) as NotificationsBloc; bloc.errors.listen((final error) { - NeonException.showSnackbar(context, error); + NeonError.showSnackbar(context, error); }); }