Skip to content

Commit

Permalink
fixed #50 swiping also refreshes correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaroti9 committed Dec 1, 2024
1 parent 9d0404b commit 218a856
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions lib/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -546,25 +546,32 @@ class _SettingsPageState extends State<SettingsPage> {
Widget SettingsMain(Color primary, Map<String, String>? settings, Function updatePage,
Function goBack, Color back, Image image, context, colors, allColors) {

return Material(
color: colors[0],
child: CustomScrollView(
slivers: <Widget>[
SliverAppBar.large(
leading:
IconButton(icon: Icon(Icons.arrow_back, color: colors[0],), onPressed: () {
HapticFeedback.selectionClick();
goBack();
}),
title: comfortatext(translation('Settings', settings!["Language"]!), 30, settings, color: colors[0]),
backgroundColor: colors[1],
pinned: false,
),
// Just some content big enough to have something to scroll.
SliverToBoxAdapter(
child: NewSettings(settings, updatePage, image, colors, allColors, context),
),
],
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
goBack();
},
child: Material(
color: colors[0],
child: CustomScrollView(
slivers: <Widget>[
SliverAppBar.large(
leading:
IconButton(icon: Icon(Icons.arrow_back, color: colors[0],),
onPressed: () {
HapticFeedback.selectionClick();
goBack();
}),
title: comfortatext(translation('Settings', settings!["Language"]!), 30, settings, color: colors[0]),
backgroundColor: colors[1],
pinned: false,
),
// Just some content big enough to have something to scroll.
SliverToBoxAdapter(
child: NewSettings(settings, updatePage, image, colors, allColors, context),
),
],
),
),
);
}
Expand Down

0 comments on commit 218a856

Please sign in to comment.