Fixed scrolling issue on some screens

This commit is contained in:
Juan Gilsanz Polo 2023-05-21 14:52:35 +02:00
parent df4564e975
commit 9aa79806a9
2 changed files with 128 additions and 162 deletions

View file

@ -294,15 +294,8 @@ class LogDetailsScreen extends StatelessWidget {
} }
else { else {
return Scaffold( return Scaffold(
body: NestedScrollView( appBar: AppBar(
headerSliverBuilder: (context, innerBoxIsScrolled) => [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
pinned: true,
floating: true,
centerTitle: false, centerTitle: false,
forceElevated: innerBoxIsScrolled,
title: Text(AppLocalizations.of(context)!.logDetails), title: Text(AppLocalizations.of(context)!.logDetails),
actions: [ actions: [
if (serversProvider.filteringStatus != null) IconButton( if (serversProvider.filteringStatus != null) IconButton(
@ -319,10 +312,7 @@ class LogDetailsScreen extends StatelessWidget {
const SizedBox(width: 10) const SizedBox(width: 10)
], ],
), ),
)
],
body: content(), body: content(),
),
); );
} }
} }

View file

@ -109,29 +109,10 @@ class _GeneralSettingsState extends State<GeneralSettings> {
} }
return Scaffold( return Scaffold(
body: NestedScrollView( appBar: AppBar(
headerSliverBuilder: (context, innerBoxIsScrolled) => [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
pinned: true,
floating: true,
centerTitle: false,
forceElevated: innerBoxIsScrolled,
title: Text(AppLocalizations.of(context)!.generalSettings), title: Text(AppLocalizations.of(context)!.generalSettings),
)
)
],
body: SafeArea(
top: false,
bottom: false,
child: Builder(
builder: (context) => CustomScrollView(
slivers: [
SliverOverlapInjector(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
), ),
SliverList.list( body: ListView(
children: [ children: [
SectionLabel(label: AppLocalizations.of(context)!.home), SectionLabel(label: AppLocalizations.of(context)!.home),
CustomListTile( CustomListTile(
@ -242,11 +223,6 @@ class _GeneralSettingsState extends State<GeneralSettings> {
] ]
], ],
) )
],
),
)
)
)
); );
} }
} }