SortableDropFallback<T> constructor
const
SortableDropFallback<T> ({
- Key? key,
- required Widget child,
- ValueChanged<
SortableData< ? onAccept,T> > - Predicate<
SortableData< ? canAccept,T> >
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 treechild(Widget, required): The widget that defines the drop zone areaonAccept(ValueChanged<SortableData<T>>?, optional): Handler for accepted dropscanAccept(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,
});