From 19a788adcb2f157b331b07b263c6d70f10c04f75 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Wed, 10 May 2023 17:05:27 +0200 Subject: [PATCH] ML-67 `ScaffoldMessenger` Null check operator used on a null value (#68) --- lib/screens/settings/screen_settings.dart | 42 ++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/lib/screens/settings/screen_settings.dart b/lib/screens/settings/screen_settings.dart index 81a569a..262803e 100644 --- a/lib/screens/settings/screen_settings.dart +++ b/lib/screens/settings/screen_settings.dart @@ -12,27 +12,29 @@ class SettingsScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return SliverScreen( - title: S.of(context).settings, - appBarActions: [ - IconButton( - onPressed: Navigator.of(context).pop, - icon: const Icon(Icons.close), - ), - ], - slivers: [ - SliverList( - delegate: SliverChildListDelegate( - [ - const MeteringSettingsSection(), - const GeneralSettingsSection(), - const ThemeSettingsSection(), - const AboutSettingsSection(), - SizedBox(height: MediaQuery.of(context).padding.bottom), - ], + return ScaffoldMessenger( + child: SliverScreen( + title: S.of(context).settings, + appBarActions: [ + IconButton( + onPressed: Navigator.of(context).pop, + icon: const Icon(Icons.close), ), - ), - ], + ], + slivers: [ + SliverList( + delegate: SliverChildListDelegate( + [ + const MeteringSettingsSection(), + const GeneralSettingsSection(), + const ThemeSettingsSection(), + const AboutSettingsSection(), + SizedBox(height: MediaQuery.of(context).padding.bottom), + ], + ), + ), + ], + ), ); } }