Skip to content

Commit

Permalink
ML-67 ScaffoldMessenger Null check operator used on a null value (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
vodemn committed May 10, 2023
1 parent f68aea5 commit 19a788a
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions lib/screens/settings/screen_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<Widget>[
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(
<Widget>[
const MeteringSettingsSection(),
const GeneralSettingsSection(),
const ThemeSettingsSection(),
const AboutSettingsSection(),
SizedBox(height: MediaQuery.of(context).padding.bottom),
],
),
),
],
),
);
}
}

0 comments on commit 19a788a

Please sign in to comment.