diff --git a/lib/presentation/views/main_menu/settings_view/settings_view.dart b/lib/presentation/views/main_menu/settings_view/settings_view.dart index 1843c90..c41c7d0 100644 --- a/lib/presentation/views/main_menu/settings_view/settings_view.dart +++ b/lib/presentation/views/main_menu/settings_view/settings_view.dart @@ -21,12 +21,17 @@ class SettingsView extends StatefulWidget { } class _SettingsViewState extends State { + + /// GlobalKey for ScaffoldMessenger to show snackbars + final _scaffoldMessengerKey = GlobalKey(); + PackageInfo _packageInfo = PackageInfo( appName: 'n.A.', packageName: 'n.A.', version: 'n.A.', buildNumber: 'n.A.', ); + @override void initState() { super.initState(); @@ -37,6 +42,7 @@ class _SettingsViewState extends State { Widget build(BuildContext context) { final loc = AppLocalizations.of(context); return ScaffoldMessenger( + key: _scaffoldMessengerKey, child: Scaffold( appBar: AppBar(backgroundColor: CustomTheme.backgroundColor), backgroundColor: CustomTheme.backgroundColor,