flutter reordable_grid_view package child white background

102 views Asked by At

I am using flutter recordable grid view package recordable_grid_view

And it puts a white background behind my custom widgets while dragging.

How to make it transparent or how to give it rounded borders. It makes the layout looks so ugly. Image example

2

There are 2 answers

0
bugel On BEST ANSWER

Nikoloz Miruashvili's answer returns an error if using some Material widgets like Chip. This is working for me in that case:

dragWidgetBuilder: (index, widget) =>
                          Material(
                             color: Colors.transparent,
                             child: widget
                             ),
0
Nikoloz Miruashvili On

I know it's very late but I just had this issue and managed to resolve it, so if anyone needs it here it goes: You can use the dragWidgetBuilder which allows you to apply any custom effects to the widget being dragged. If you don't want any effects to be applied (Including the white background and the ugly shadow), you can simply add this to ReorderableGridView constructor:

dragWidgetBuilder: (index, widget) => widget