flutter-reorderable-grid-view icon indicating copy to clipboard operation
flutter-reorderable-grid-view copied to clipboard

Feature/custom draggable builders

Open JesperBllnbm opened this issue 1 year ago • 5 comments

Hi there,

thank you for this great package!

For my project I needed more customising options for the draggables (e.g. rootOverlay, custom dragAnchors, access to all callbacks) and so I came up with the idea of implementing a customDraggablesBuilder. The pull request is intended more as a basis for discussion than as an actual implementation. I think there is still a lot to optimise. But what do you think of the idea? It's a bit ugly that the user now has to add the package-relevant callbacks themselves. As an alternative, I could imagine that draggables are actually passed, but these only act as data containers and everything is put together again in the reorderable_draggable.dart - analogue to the current implementation of CustomDraggables.

Cheers, Jesper

JesperBllnbm avatar Nov 10 '23 10:11 JesperBllnbm

Hello @JesperBllnbm Thanks for opening the Draft-PR. Can you change the target branch to release/v5.0.0 so that I can see your changes?

karvulf avatar Nov 10 '23 10:11 karvulf

Now I see it I will think tomorrow about this and come back to you @JesperBllnbm

karvulf avatar Nov 10 '23 10:11 karvulf

Good morning @JesperBllnbm So I thought about your idea, what exactly do you want to achieve by customization? Because most of these things are already reachable as parameters as you said. And I could also extend the access to parameters that are currently stored only locally for the child but I need some more information to imagine how this will be useful for you.

karvulf avatar Nov 11 '23 09:11 karvulf

Hi @karvulf ,

right now I needed access to rootOverlay. In my case the DraggableBuilder is inside a scaled context. That means I needed to customise the dragAnchor strategy and the feedback widget (because the rootOverlay is not scaled).

Also, I appreciate the idea of having a package that is not hiding the Flutter API from me. However, if maintaining a more compact approach is your preference, I completely understand. In that case, I'll proceed with using my fork.

Cheers

JesperBllnbm avatar Nov 12 '23 21:11 JesperBllnbm

In that case, I could make the feedback widget more customizable and also add the drag anchor strategy. I will come back with that to you later @JesperBllnbm

karvulf avatar Nov 13 '23 06:11 karvulf