CompletionHandler typedef

CompletionHandler = dynamic Function(bool)

If you want the animation I support you should modify your data source first,then wait handler to execute,after that, you can call setState to update your UI.

Code Example

initState(){ List list = 1,2,3,5; }

onTap(handler)async {

list.removeAt(2);

await handler(true or false); //true: will delete this row in ListView ,false: will not delete it //Q:When to use "await"? A:The time when you want animation

setState((){}); }

Implementation

typedef CompletionHandler = Function(bool);