Improvements add bookmark

This commit is contained in:
Juan Gilsanz Polo
2024-02-24 12:39:18 +01:00
parent 35b1b239f9
commit 621eb8ff25

View File

@@ -20,7 +20,15 @@ class AddBookmarkModal extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
return Dialog.fullscreen( return Dialog.fullscreen(
child: Scaffold( child: Scaffold(
appBar: AppBar( body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) => [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar.large(
pinned: true,
floating: true,
centerTitle: false,
forceElevated: innerBoxIsScrolled,
leading: CloseButton( leading: CloseButton(
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
@@ -36,7 +44,27 @@ class AddBookmarkModal extends ConsumerWidget {
const SizedBox(width: 8), const SizedBox(width: 8),
], ],
), ),
body: const _ModalContent(), ),
],
body: SafeArea(
top: false,
bottom: true,
child: Builder(
builder: (context) => CustomScrollView(
slivers: [
SliverOverlapInjector(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
),
SliverList.list(
children: const [
_ModalContent(),
],
),
],
),
),
),
),
), ),
); );
} }
@@ -51,7 +79,8 @@ class _ModalContent extends ConsumerWidget {
final tags = ref.watch(getTagsProvider); final tags = ref.watch(getTagsProvider);
return ListView( return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const SizedBox(height: 16), const SizedBox(height: 16),
SectionLabel( SectionLabel(
@@ -308,6 +337,7 @@ class _ModalContent extends ConsumerWidget {
? (v) => ref.read(addBookmarkProvider.notifier).updateMarkAsUnread(v) ? (v) => ref.read(addBookmarkProvider.notifier).updateMarkAsUnread(v)
: null, : null,
), ),
const SizedBox(height: 16),
], ],
); );
} }