Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dismiss flutter dismissable widget programmatically?

Is it possible to dismiss dismissable programmatically? Not by swipe, but by let's say button click. The only thing that comes in mind is imitating gesture event with a certain velocity, but this sounds horribly wrong.

like image 579
Denis Rudenko Avatar asked Oct 11 '19 10:10

Denis Rudenko


People also ask

How do I dismiss a widget in flutter?

A widget that can be dismissed by dragging in the indicated direction. Dragging or flinging this widget in the DismissDirection causes the child to slide out of view.

What is dismissible flutter?

Flutter Widget - Dismissible() Dismissible takes a child, a background, and a key, and it will detect swipe gestures and animate the child, sliding over the background.


1 Answers

How about considering an AnimatedList instead.

A scrolling container that animates items when they are inserted or removed. This widget is similar to one created by ListView.builder.

like image 145
Jannie Theunissen Avatar answered Sep 21 '22 20:09

Jannie Theunissen