Skip to content

Commit c678363

Browse files
committed
refactor: Put cover image picker into card with padding in physical book form
1 parent d4e05d7 commit c678363

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

client/lib/widgets/add_book/add_physical_book_sheet.dart

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -323,17 +323,25 @@ class _PhysicalBookContentState extends State<_PhysicalBookContent> {
323323
Column(
324324
crossAxisAlignment: CrossAxisAlignment.stretch,
325325
children: [
326-
CoverImagePicker(
327-
initialUrl: _coverUrl,
328-
initialBytes: _coverImageBytes,
329-
onUrlChanged: (url) => setState(() => _coverUrl = url),
330-
onFileChanged: (bytes) => setState(() {
331-
_coverImageBytes = bytes;
332-
if (bytes != null) _coverUrl = null;
333-
}),
334-
coverWidth: 205.0,
335-
coverHeight: 315.0,
326+
Card(
327+
margin: const EdgeInsets.only(bottom: Spacing.xs),
328+
child: Padding(
329+
padding: const EdgeInsets.all(Spacing.md),
330+
child: CoverImagePicker(
331+
initialUrl: _coverUrl,
332+
initialBytes: _coverImageBytes,
333+
onUrlChanged: (url) =>
334+
setState(() => _coverUrl = url),
335+
onFileChanged: (bytes) => setState(() {
336+
_coverImageBytes = bytes;
337+
if (bytes != null) _coverUrl = null;
338+
}),
339+
coverWidth: 205.0,
340+
coverHeight: 315.0,
341+
),
342+
),
336343
),
344+
337345
_buildIsbnSection(),
338346
_buildBasicInfoSection(),
339347
_buildPublicationSection(),

0 commit comments

Comments
 (0)