-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dismissible and implicitly_animated_reorderable_list #21
Comments
Found a nice solution here that explains how to use Dismissible with Animated List https://morthor.medium.com/flutter-animatedlist-sizetransition-dismissible-dce49c11200d
|
yes, |
Thx Ben, yeah I got it working via a regular Animated List, but still saw a flicker with Animated_List_Plus unfortunately. Dont know if animatedListKey solution also works with Animated_List_Plus |
I adapted from the above solution by temporarily storing the id of the item being deleted, and in the list.build method if the item matches, then it just returns an empty SizedBox while the Dismissible does its thing. |
Just tried wrapping the Animated Item in Dismissible, but getting an error https://stackoverflow.com/questions/55792521/how-to-fix-a-dismissed-dismissible-widget-is-still-part-of-the-tree-error-in
will try to get a full example going...
PS It looks like the animation is carried out twice, once by Dismissible, and then by Implicitly_animated_reorderable_list. Perhaps need to override somehow the removedItemBuilder to avoid animation if Dismissible was used...
PS2 Looks like the example uses the Flutter Slideable package. Gonna check it out. https://github.com/wwwdata/implicitly_animated_reorderable_list/blob/479c09211e5b02093e294ca7c573f98f43c62124/example/lib/ui/lang_page.dart
itemBuilder: (context, animation, item, index) {
// Specifiy a transition to be used by the ImplicitlyAnimatedList.
// See the Transitions section on how to import this transition.
return Dismissible(
...
child: SizeFadeTransition(
sizeFraction: 0.7,
curve: Curves.easeInOut,
animation: animation,
child: Text(item.name),
);
},
The text was updated successfully, but these errors were encountered: