philip-brink / DragAndDropLists

Flutter package for drag-and-drop reordering of two-level lists
BSD 3-Clause "New" or "Revised" License
253 stars 128 forks source link

disable toggling of List #95

Open eelco2k opened 10 months ago

eelco2k commented 10 months ago

it would be nice to have an option to disable the toggle/expand functionality so that a list always remains open.

something like wrap the contents with an IgnorePointer if ignoring == true (toggle disabled)

var contents = _generateDragAndDropListInnerContents(params);

if (ignoring == true) {
   contents = IgnorePointer(
       ignoring: ignoring,
       child: contents
   );
}

Widget expandable = ProgrammaticExpansionTile(
      title: title,
      listKey: listKey,
      subtitle: subtitle,
      trailing: trailing,
      leading: leading,
      disableTopAndBottomBorders: disableTopAndBottomBorders,
      backgroundColor: backgroundColor,
      initiallyExpanded: initiallyExpanded,
      onExpansionChanged: _onSetExpansion,
      key: _expansionKey,
      children: contents,
    );