|
1 | 1 | import 'package:flutter/material.dart'; |
2 | | -import 'package:papyrus/widgets/shared/expandable_bottom_sheet.dart'; |
3 | 2 | import 'package:papyrus/themes/design_tokens.dart'; |
4 | | -import 'package:papyrus/widgets/add_book/add_book_sheet_scaffold.dart'; |
| 3 | +import 'package:papyrus/widgets/shared/app_bottom_sheet.dart'; |
5 | 4 | import 'package:papyrus/widgets/add_book/book_import_batch_item.dart'; |
6 | 5 | import 'package:papyrus/widgets/add_book/book_import_drop_zone.dart'; |
7 | 6 | import 'package:papyrus/widgets/add_book/book_import_item_card.dart'; |
@@ -39,9 +38,13 @@ class BookImportSelectingSection extends StatelessWidget { |
39 | 38 | Widget build(BuildContext context) { |
40 | 39 | final hasFiles = files.isNotEmpty; |
41 | 40 |
|
42 | | - return AddBookSheetScaffold( |
| 41 | + return AppBottomSheet( |
| 42 | + headerKey: const Key('add-book-sheet-header'), |
| 43 | + footerKey: const Key('add-book-sheet-footer'), |
| 44 | + expandOnScroll: false, |
| 45 | + scrollable: false, |
| 46 | + contentPadding: EdgeInsets.zero, |
43 | 47 | title: 'Import books', |
44 | | - footerPadding: const EdgeInsets.symmetric(horizontal: Spacing.md, vertical: Spacing.sm), |
45 | 48 | canClose: true, |
46 | 49 | onClose: onClose, |
47 | 50 | body: hasFiles ? _buildFileList(context) : _buildBrowseOnly(context), |
@@ -83,7 +86,7 @@ class BookImportSelectingSection extends StatelessWidget { |
83 | 86 | final colorScheme = Theme.of(context).colorScheme; |
84 | 87 |
|
85 | 88 | return ListView( |
86 | | - shrinkWrap: context.findAncestorWidgetOfExactType<ExpandableBottomSheet>() != null, |
| 89 | + shrinkWrap: true, |
87 | 90 | controller: scrollController, |
88 | 91 | padding: const EdgeInsets.symmetric(horizontal: Spacing.lg, vertical: Spacing.md), |
89 | 92 | children: [ |
@@ -141,13 +144,17 @@ class BookImportProcessingSection extends StatelessWidget { |
141 | 144 |
|
142 | 145 | @override |
143 | 146 | Widget build(BuildContext context) { |
144 | | - return AddBookSheetScaffold( |
| 147 | + return AppBottomSheet( |
| 148 | + headerKey: const Key('add-book-sheet-header'), |
| 149 | + footerKey: const Key('add-book-sheet-footer'), |
| 150 | + expandOnScroll: false, |
| 151 | + scrollable: false, |
| 152 | + contentPadding: EdgeInsets.zero, |
145 | 153 | title: 'Importing books', |
146 | | - footerPadding: const EdgeInsets.symmetric(horizontal: Spacing.md, vertical: Spacing.sm), |
147 | 154 | canClose: !isClosing, |
148 | 155 | onClose: onClose, |
149 | 156 | body: ListView.separated( |
150 | | - shrinkWrap: context.findAncestorWidgetOfExactType<ExpandableBottomSheet>() != null, |
| 157 | + shrinkWrap: true, |
151 | 158 | controller: scrollController, |
152 | 159 | padding: const EdgeInsets.symmetric(horizontal: Spacing.lg, vertical: Spacing.md), |
153 | 160 | itemCount: items.length, |
@@ -195,13 +202,17 @@ class BookImportSummarySection extends StatelessWidget { |
195 | 202 | Widget build(BuildContext context) { |
196 | 203 | final hasFailures = failureCount > 0; |
197 | 204 |
|
198 | | - return AddBookSheetScaffold( |
| 205 | + return AppBottomSheet( |
| 206 | + headerKey: const Key('add-book-sheet-header'), |
| 207 | + footerKey: const Key('add-book-sheet-footer'), |
| 208 | + expandOnScroll: false, |
| 209 | + scrollable: false, |
| 210 | + contentPadding: EdgeInsets.zero, |
199 | 211 | title: 'Import complete', |
200 | | - footerPadding: const EdgeInsets.symmetric(horizontal: Spacing.md, vertical: Spacing.sm), |
201 | 212 | canClose: !isClosing, |
202 | 213 | onClose: onDone, |
203 | 214 | body: ListView( |
204 | | - shrinkWrap: context.findAncestorWidgetOfExactType<ExpandableBottomSheet>() != null, |
| 215 | + shrinkWrap: true, |
205 | 216 | controller: scrollController, |
206 | 217 | padding: const EdgeInsets.symmetric(horizontal: Spacing.lg, vertical: Spacing.md), |
207 | 218 | children: items |
|
0 commit comments