Updated more appbars

This commit is contained in:
Juan Gilsanz Polo 2023-05-18 13:54:50 +02:00
parent 8dffb83fd0
commit ecd9b4fc89
4 changed files with 333 additions and 266 deletions

View file

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

View file

@ -42,11 +42,29 @@ class AdvancedSettings extends StatelessWidget {
}
return Scaffold(
appBar: AppBar(
title: Text(AppLocalizations.of(context)!.advancedSettings),
body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) => [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
pinned: true,
floating: true,
centerTitle: false,
forceElevated: innerBoxIsScrolled,
title: Text(AppLocalizations.of(context)!.generalSettings),
)
)
],
body: SafeArea(
top: false,
bottom: false,
child: Builder(
builder: (context) => CustomScrollView(
slivers: [
SliverOverlapInjector(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
),
body: ListView(
SliverList.list(
children: [
CustomListTile(
icon: Icons.lock,
@ -88,7 +106,12 @@ class AdvancedSettings extends StatelessWidget {
)
),
],
)
],
),
)
)
)
);
}
}

View file

@ -126,11 +126,29 @@ class _GeneralSettingsState extends State<GeneralSettings> {
}
return Scaffold(
appBar: AppBar(
title: Text(AppLocalizations.of(context)!.generalSettings),
body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) => [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
pinned: true,
floating: true,
centerTitle: false,
forceElevated: innerBoxIsScrolled,
title: Text(AppLocalizations.of(context)!.generalSettings),
)
)
],
body: SafeArea(
top: false,
bottom: false,
child: Builder(
builder: (context) => CustomScrollView(
slivers: [
SliverOverlapInjector(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
),
body: ListView(
SliverList.list(
children: [
CustomListTile(
icon: Icons.exposure_zero_rounded,
@ -179,7 +197,12 @@ class _GeneralSettingsState extends State<GeneralSettings> {
trailing: generateAppUpdateStatus()
)
],
)
],
),
)
)
)
);
}
}

View file

@ -114,10 +114,19 @@ class SettingsWidget extends StatelessWidget {
}
return Scaffold(
appBar: AppBar(
title: Text(AppLocalizations.of(context)!.settings),
body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) => [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar.large(
pinned: true,
floating: true,
centerTitle: false,
),
forceElevated: innerBoxIsScrolled,
title: Text(AppLocalizations.of(context)!.settings),
)
)
],
body: ListView(
children: [
if (serversProvider.selectedServer != null && serversProvider.serverStatus.data != null) ...[
@ -268,6 +277,7 @@ class SettingsWidget extends StatelessWidget {
)
],
),
)
);
}
}