diff --git a/lib/utils/view_utils.dart b/lib/utils/view_utils.dart index 477b5f70..57e69f5f 100644 --- a/lib/utils/view_utils.dart +++ b/lib/utils/view_utils.dart @@ -23,7 +23,10 @@ import 'globals.dart'; import 'logger.dart'; import 'riverpod/riverpod_providers/state_providers/status_message_provider.dart'; +/// Shows a snackbar message to the user for 3 seconds. ScaffoldFeatureController? showSnackBar(String message) => _showSnackBar(message, const Duration(seconds: 3)); + +/// Shows a snackbar message to the user for 10 seconds. ScaffoldFeatureController? showSnackBarLong(String message) => _showSnackBar(message, const Duration(seconds: 10)); /// Shows a snackbar message to the user for a given `Duration`. diff --git a/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_field.dart b/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_field.dart index 862df9b3..17cdf851 100644 --- a/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_field.dart +++ b/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_field.dart @@ -72,7 +72,7 @@ class _LinkInputViewState extends ConsumerState { onPressed: () async { ClipboardData? data = await Clipboard.getData('text/plain'); if (data == null || data.text == null || data.text!.isEmpty) { - if (context.mounted) ref.read(statusMessageProvider.notifier).state = (AppLocalizations.of(context)!.clipboardEmpty, ''); + if (context.mounted) ref.read(statusMessageProvider.notifier).state = (AppLocalizations.of(context)!.clipboardEmpty, null); return; } setState(() => textController.text = data.text ?? ''); diff --git a/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_view.dart b/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_view.dart index bebc765b..0bb2b1e9 100644 --- a/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_view.dart +++ b/lib/views/add_token_manually_view/add_token_manually_view_widgets/link_input_view.dart @@ -37,7 +37,7 @@ class _LinkInputViewState extends ConsumerState { Future addToken(Uri link) async { if (link.scheme != 'otpauth') { - ref.read(statusMessageProvider.notifier).state = (AppLocalizations.of(context)!.linkMustOtpAuth, ''); + ref.read(statusMessageProvider.notifier).state = (AppLocalizations.of(context)!.linkMustOtpAuth, null); return; } await ref.read(tokenProvider.notifier).handleLink(link); @@ -76,7 +76,7 @@ class _LinkInputViewState extends ConsumerState { onPressed: () async { ClipboardData? data = await Clipboard.getData('text/plain'); if (data == null || data.text == null || data.text!.isEmpty) { - if (context.mounted) ref.read(statusMessageProvider.notifier).state = (AppLocalizations.of(context)!.clipboardEmpty, ''); + if (context.mounted) ref.read(statusMessageProvider.notifier).state = (AppLocalizations.of(context)!.clipboardEmpty, null); return; } setState(() => textController.text = data.text ?? ''); diff --git a/pubspec.yaml b/pubspec.yaml index 39e06bd0..c71ae0cc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ publish_to: none # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 4.4.2+404206 # TODO Set the right version number +version: 4.4.3+404301 # TODO Set the right version number # version: major.minor.build + 2x major|2x minor|3x build # version: version number + build number (optional)