knopp / flutter_reorderable_list

ReorderableList for Flutter
BSD 3-Clause "New" or "Revised" License
335 stars 98 forks source link

Features request: limited dragging range. #13

Closed AverageChau closed 4 years ago

AverageChau commented 4 years ago

So my list have 2 section: pinned and regular. All pinned items is on the beginning of the list, the regular item is the rest. I would like when user drag the pinned item, the pinned item can not move out of the pinned section. It is the same with the regular section.

knopp commented 4 years ago

You can return false from reorder callback if item gets reordered out of its section.

AverageChau commented 4 years ago

It worked