Is it possible to disable reordering a single item in a reorderable listview in flutter?

856

Just discovered the AbsorbPointer and IgnorePointer classes.

Share:
856
Admin
Author by

Admin

Updated on December 30, 2022

Comments

  • Admin
    Admin over 1 year

    I am trying to create a ListView that meets the following criteria:

    1. The items in the ListView are categorized into sections with headers for each section
    2. The items can be dragged from one section to another
    3. The section headers are not draggable

    This would easy to accomplish if ReorderableListView allowed you to disable a ListTile from being dragged & dropped (in other words, I would be able to create the headers as ListTile items in the ListView and disable dragging and dropping on only them while still allowing everything else to be dragged & dropped), but I can't figure out how. Any tips?