Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: Sort, Drag and Drop between multiple lists or columns

I've been researching some list sorting libraries like flutter_list_drag_and_drop, reorderable_list, flutter_reorderable_list, dragable_flutter_list, and others, but all work with only one list.

What I'm wanting to do can be understood in the image below, which is exactly what the Trello app has.

Any library suggestions or how to do this?

Drag and Drop

like image 408
EderBaum Avatar asked Feb 10 '19 23:02

EderBaum


4 Answers

Just to complete this old question and for the case someone like me is searching in 2021 here is a package that can manage drag and drop items from one list to another and drag and drop these lists themselves. Flutter package from pub.dev

Tutorial can be found here: Tutorial by Johannes Milke

like image 99
sefre Avatar answered Nov 17 '22 03:11

sefre


I use boardview flutter plugin.

import 'package:boardview/board_item.dart';
import 'package:boardview/board_list.dart';
import 'package:boardview/boardview.dart';
@override
  Widget build(BuildContext context) {

List<BoardList> boardList = List<BoardList>();
List<BoardItem> boardItem = List<BoardItem>();
    boardItem.add(new BoardItem(
      boardList: BoardListState(),
      item: boarditem(),
      test: '1',
    ));

boardList.add(BoardList(
      index: 1,
      items: boardItem,
      header: header()
    ));

Widget header() {
    return Row( ... );}

Widget boarditem() {
    return Card( ... );}

 return BoardView(
      lists: boardList,
    );
}
like image 36
Para Str Avatar answered Nov 17 '22 04:11

Para Str


If you still haven't found a good solution there's the boardview flutter plugin.

It has the same features as trellos draggable lists.

(P.S. I'm the developer for it I was lazy when creating it so there are no example gifs for it)

like image 30
Jacob Bonk Avatar answered Nov 17 '22 02:11

Jacob Bonk


I've been researching some list sorting libraries like flutter_list_drag_and_drop, reorderable_list, flutter_reorderable_list, dragable_flutter_list and others, but all work with only one list.

Right ! All current available libraries work with only one list.

I got one more plugin called orderable_stack which is based on a "data items" list

Please refer orderable_stack for more details.

Also you can refer this link for more draggable implementations.

enter image description here enter image description here Note: Currently orderable_stack is incompatible with Dart 2

Hope this will helps you

like image 5
Rahul Mahadik Avatar answered Nov 17 '22 02:11

Rahul Mahadik