dismissDrop static method

void dismissDrop(
  1. BuildContext context
)

Dismisses any pending drop operations.

Finds the sortable layer in the widget tree and dismisses any currently pending drop operations. This clears any visual feedback or animations related to incomplete drops.

Parameters:

  • context (BuildContext): The build context to find the layer from

Example:

// Clear any pending drops when navigating away
SortableLayer.dismissDrop(context);

Implementation

static void dismissDrop(BuildContext context) {
  final layer = Data.of<_SortableLayerState>(context);
  layer.dismissDrop();
}