From c447c2087f87bf64908d876877c5a10bbce0fe96 Mon Sep 17 00:00:00 2001 From: Krille Date: Mon, 4 Nov 2024 12:48:07 +0100 Subject: [PATCH] chore: Follow up update snackbar --- lib/utils/show_update_snackbar.dart | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/lib/utils/show_update_snackbar.dart b/lib/utils/show_update_snackbar.dart index 1c4ee8972..1b408ec22 100644 --- a/lib/utils/show_update_snackbar.dart +++ b/lib/utils/show_update_snackbar.dart @@ -11,7 +11,6 @@ abstract class UpdateNotifier { static const String versionStoreKey = 'last_known_version'; static void showUpdateSnackBar(BuildContext context) async { - final theme = Theme.of(context); final scaffoldMessenger = ScaffoldMessenger.of(context); final currentVersion = await PlatformInfos.getVersion(); final store = await SharedPreferences.getInstance(); @@ -19,27 +18,11 @@ abstract class UpdateNotifier { if (currentVersion != storedVersion) { if (storedVersion != null) { - ScaffoldFeatureController? controller; - controller = scaffoldMessenger.showSnackBar( + scaffoldMessenger.showSnackBar( SnackBar( duration: const Duration(seconds: 30), - content: Row( - children: [ - IconButton( - icon: Icon( - Icons.close_outlined, - size: 20, - color: theme.colorScheme.onPrimary, - ), - onPressed: () => controller?.close(), - ), - Expanded( - child: Text( - L10n.of(context).updateInstalled(currentVersion), - ), - ), - ], - ), + showCloseIcon: true, + content: Text(L10n.of(context).updateInstalled(currentVersion)), action: SnackBarAction( label: L10n.of(context).changelog, onPressed: () => launchUrlString(AppConfig.changelogUrl),