You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
expose the moveController of the Dismissible widget #74582
My proposal is to expose an interface for the Dismissible widget (in the flutter/material.dart package) to show the value of the current offset in which the item has been dragged.
In my use case I wanted to implement an animation of an object fading in while the dismissible is beeing dismissed, in such a way that the offset of the dismissed item equals the opacity at each moment. I was able to do so only by changing _DismissibleState, _moveController and _dragExtent from private to public. I used flutter stable channel 1.22.5.
where dragListener uses moveController.value and dragExtent.sign to set the state of the faded object.
I tried to do it without changing the flutter base code, by listening to onPointerDown, onPointerUp and onPointerMove events, but then I had to compute myself the offset and it was very buggy because there are many cases were the user can do funny stuff.
I couldn't find any other solution on the internet. I would appriciate if this could become available in future release.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
pedromassangocode commentedon Jan 25, 2021
Related to #21230.
github-actions commentedon Feb 19, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.