SortableData<T> constructor

const SortableData<T>(
  1. T data
)

Creates a SortableData wrapper for the given data.

Wraps the provided data in an immutable container that can be used with sortable widgets for drag-and-drop operations.

Parameters:

  • data (T, required): The data to wrap for sorting operations

Example:

// Wrapping different data types
SortableData('text_item')
SortableData(42)
SortableData(MyCustomObject(id: 1))

Implementation

const SortableData(this.data);