fix: Fix scrolling issue, update selection app bar

This commit is contained in:
Anton Stubenbord
2023-03-18 16:23:09 +01:00
parent 993f6af827
commit 78fbd042a6
7 changed files with 195 additions and 189 deletions

View File

@@ -19,7 +19,11 @@ class DocumentSelectionSliverAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SliverAppBar(
stretch: false,
pinned: true,
floating: true,
snap: true,
backgroundColor: Theme.of(context).colorScheme.surfaceVariant,
title: Text(
S.of(context)!.countSelected(state.selection.length),
),

View File

@@ -29,6 +29,10 @@ class ViewTypeSelectionWidget extends StatelessWidget {
}
return PopupMenuButton<ViewType>(
constraints: const BoxConstraints(
minWidth: 4 * 56.0,
maxWidth: 5 * 56.0,
), // Ensures text is not split into two lines
position: PopupMenuPosition.under,
initialValue: viewType,
icon: Icon(icon),
@@ -70,7 +74,10 @@ class ViewTypeSelectionWidget extends StatelessWidget {
child: ListTile(
selected: selected,
trailing: selected ? const Icon(Icons.done) : null,
title: Text(label),
title: Text(
label,
maxLines: 1,
),
iconColor: Theme.of(context).colorScheme.onSurface,
textColor: Theme.of(context).colorScheme.onSurface,
leading: Icon(icon),