# drag_list_fork **Repository Path**: jokerdj/drag_list_fork ## Basic Information - **Project Name**: drag_list_fork - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-20 - **Last Updated**: 2020-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DragList [![pub package](https://img.shields.io/pub/v/drag_list.svg)](https://pub.dartlang.org/packages/drag_list) Flutter list widget that allows to drag and drop items and define custom drag handle widget. ![DragList demo](https://giant.gfycat.com/BraveElegantDarklingbeetle.gif) ## Getting Started Add `DragList` component to your widget tree: ```Dart child: DragList( items: ['Tuna', 'Meat', 'Cheese', 'Potato', 'Eggs', 'Bread'], itemExtent: 72.0, builder: (context, item, handle) { return Container( height: 72.0, child: Row(children: [ Spacer(), Text(item), Spacer(), handle, ]), ); }, ), ``` Optionally, provide custom handle builder: ```Dart child: DragList( // ... handleBuilder: (context) { return Padding( padding: EdgeInsets.all(16.0), child: Container( color: Colors.green, child: Text('Handle'), ), ); }, ), ``` Add other optional parameter if needed: ```Dart child: DragList( // ... animDuration: Duration(milliseconds: 500), dragDelay: Duration(seconds: 1), handleAlignment: -0.3, scrollDirection: Axis.horizontal, onItemReorder: (from, to) { // handle item reorder on your own }, ), ``` Use `handleless` constructor if you want list item to be dragged no matter where it's tapped on: ```Dart DragList.handleless( // ... builder: (context, item) { return Container( height: 72.0, child: Center(child: Text(item)), ); }, ), ```