SortableDropFallback<T> constructor

const SortableDropFallback<T>({
  1. Key? key,
  2. required Widget child,
  3. ValueChanged<SortableData<T>>? onAccept,
  4. Predicate<SortableData<T>>? canAccept,
})

Creates a SortableDropFallback drop zone.

Configures a fallback drop zone that can accept sortable items dropped outside of specific sortable widget drop zones.

Parameters:

  • key (Key?): Widget identifier for the widget tree
  • child (Widget, required): The widget that defines the drop zone area
  • onAccept (ValueChanged<SortableData<T>>?, optional): Handler for accepted drops
  • canAccept (Predicate<SortableData<T>>?, optional): Validation for drops

Example:

SortableDropFallback<String>(
  canAccept: (data) => data.data.contains('removable'),
  onAccept: (data) => removeFromList(data.data),
  child: Icon(Icons.delete, size: 48),
)

Implementation

const SortableDropFallback({
  super.key,
  required this.child,
  this.onAccept,
  this.canAccept,
});