karvulf / flutter-reorderable-grid-view

BSD 3-Clause "New" or "Revised" License
143 stars 20 forks source link

Feature/custom draggable builders #101

Closed JesperBllnbm closed 2 months ago

JesperBllnbm commented 10 months ago

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

karvulf commented 10 months ago

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 commented 10 months ago

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

karvulf commented 10 months ago

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.

JesperBllnbm commented 10 months ago

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

karvulf commented 10 months ago

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