Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Let the reader settings sheet be swiped closed

Barnabas3c94b1d42b16
diff --git a/lib/widgets/ebook_reader_view.dart b/lib/widgets/ebook_reader_view.dart
index 549fd87e..2353f4a9 100644
--- a/lib/widgets/ebook_reader_view.dart
+++ b/lib/widgets/ebook_reader_view.dart
@@ -1021,8 +1021,18 @@ class EbookReaderViewState extends State<EbookReaderView> with WidgetsBindingObs
builder: (ctx) => StatefulBuilder(
builder: (ctx, setSheetState) {
final l = AppLocalizations.of(ctx)!;
+ // DraggableScrollableSheet wires the inner scroll to the sheet so a
+ // downward drag past the minimum dismisses it - a bare
+ // SingleChildScrollView swallowed the drag and only the back button
+ // could close the sheet.
return SafeArea(
- child: SingleChildScrollView(
+ child: DraggableScrollableSheet(
+ expand: false,
+ initialChildSize: 0.85,
+ minChildSize: 0.4,
+ maxChildSize: 0.95,
+ builder: (ctx, scrollCtrl) => SingleChildScrollView(
+ controller: scrollCtrl,
child: Padding(
padding: const EdgeInsets.fromLTRB(24, 16, 24, 16),
child: Column(
@@ -1235,6 +1245,7 @@ class EbookReaderViewState extends State<EbookReaderView> with WidgetsBindingObs
),
),
),
+ ),
);
},
),