mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-23 23:44:44 +01:00
Padding should be handled by children
This commit is contained in:
parent
658e808fcd
commit
b446f229d0
2 changed files with 89 additions and 86 deletions
|
@ -16,7 +16,9 @@ class PhotoListImage extends StatelessWidget {
|
|||
|
||||
@override
|
||||
build(BuildContext context) {
|
||||
return FittedBox(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: FittedBox(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
fit: BoxFit.cover,
|
||||
child: Stack(
|
||||
|
@ -63,6 +65,7 @@ class PhotoListImage extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -80,7 +83,9 @@ class PhotoListVideo extends StatelessWidget {
|
|||
|
||||
@override
|
||||
build(BuildContext context) {
|
||||
return FittedBox(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: FittedBox(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
fit: BoxFit.cover,
|
||||
child: Stack(
|
||||
|
@ -125,6 +130,7 @@ class PhotoListVideo extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,10 +104,7 @@ mixin SelectableItemStreamListMixin<T extends StatefulWidget> on State<T> {
|
|||
|
||||
Widget _buildItem(BuildContext context, int index) {
|
||||
final item = _items[index];
|
||||
final content = Padding(
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: item.buildWidget(context),
|
||||
);
|
||||
final content = item.buildWidget(context);
|
||||
if (item.isSelectable) {
|
||||
return Selectable(
|
||||
isSelected: _selectedItems.contains(item),
|
||||
|
|
Loading…
Add table
Reference in a new issue