Remove padding from Draggable

This commit is contained in:
Ming Ming 2024-10-20 18:36:32 +08:00
parent b871fdf49b
commit d73fd18294
2 changed files with 25 additions and 24 deletions

View file

@ -113,9 +113,13 @@ class _EditContentList extends StatelessWidget {
.getThumbSize(zoomLevel.requireData)
.toDouble(),
items: state.editTransformedItems ?? state.transformedItems,
itemBuilder: (context, _, item) => item.buildWidget(context),
itemBuilder: (context, _, item) => Padding(
padding: const EdgeInsets.all(8),
child: item.buildWidget(context),
),
itemDragFeedbackBuilder: (context, _, item) =>
item.buildDragFeedbackWidget(context),
item.buildDragFeedbackWidget(context) ??
item.buildWidget(context),
staggeredTileBuilder: (_, item) => item.staggeredTile,
onDragResult: (results) {
context.addEvent(_EditManualSort(results));

View file

@ -41,9 +41,7 @@ class Draggable<T extends Object> extends StatelessWidget {
return Stack(
fit: StackFit.expand,
children: [
Padding(
padding: const EdgeInsets.all(8),
child: LongPressDraggable<T>(
LongPressDraggable<T>(
data: data,
dragAnchorStrategy: pointerDragAnchorStrategy,
onDragStarted: onDragStarted,
@ -67,7 +65,6 @@ class Draggable<T extends Object> extends StatelessWidget {
),
child: child,
),
),
if (onDropBefore != null || onDropAfter != null)
Positioned.fill(
child: Row(