mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-13 04:56:21 +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
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
return FittedBox(
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(2),
|
||||||
|
child: FittedBox(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
|
@ -63,6 +65,7 @@ class PhotoListImage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +83,9 @@ class PhotoListVideo extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
return FittedBox(
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(2),
|
||||||
|
child: FittedBox(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
child: Stack(
|
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) {
|
Widget _buildItem(BuildContext context, int index) {
|
||||||
final item = _items[index];
|
final item = _items[index];
|
||||||
final content = Padding(
|
final content = item.buildWidget(context);
|
||||||
padding: const EdgeInsets.all(2),
|
|
||||||
child: item.buildWidget(context),
|
|
||||||
);
|
|
||||||
if (item.isSelectable) {
|
if (item.isSelectable) {
|
||||||
return Selectable(
|
return Selectable(
|
||||||
isSelected: _selectedItems.contains(item),
|
isSelected: _selectedItems.contains(item),
|
||||||
|
|
Loading…
Reference in a new issue