flutter-reorderable-grid-view
flutter-reorderable-grid-view copied to clipboard
When wrap ReorderableBuilder in Directionality drag animation and position is not correct.
Wrap ReorderableBuilder in Directionality with textDirection: TextDirection.rtl drag animation and position is not correct.
Code:
Directionality(
textDirection: TextDirection.rtl,
child: ReorderableBuilder(
enableScrollingWhileDragging: false,
children: items,
// scrollController: _scrollController,
onReorder: (List<OrderUpdateEntity> orderUpdateEntities) {},
builder: (children) {
return GridView(
// key: _gridViewKey,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
// controller: _scrollController,
children: children,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
mainAxisSpacing: 3,
crossAxisSpacing: 8,
crossAxisCount: 3,
),
);
},
),
)
Hi @taosimple Thank you for opening the issue. I will check this in the next days and come back.
I couldn't reproduce your issue with the code you gave me. Can you also show me how your items are built? @taosimple
Just a image list @karvulf
List<Widget> items = imgList.map((path) {
return ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(6)),
child: Image.file(
File(path),
width: imageSize,
height: imageSize,
fit: BoxFit.cover,
),
);
}).toList();
Ah ok I think I know that issue, can you try to add initDelay with a delay of const Duration(milliseconds: 200) and try it again? Possibly that solves your issue. @taosimple
Sorry, my code is updated, and when I rollback, I couldn't reproduce the issue. It's strange.
Hmm ok, I will check that again on the weekend, maybe I can find the main issue. I know there is something strange combined with images, but glad to hear that it is working currently @taosimple