Quantcast
Channel: Active questions tagged listview - Stack Overflow
Viewing all articles
Browse latest Browse all 790

Flutter: animate item removal in ListView

$
0
0

I am building a ListView from a Stream. I need to animate deletions and insertions to that list, but have no idea how.

I have seen this sample by Flutter but it is not related to streams in any way: https://flutter.io/catalog/samples/animated-list/

Any help greatly appreciated :)

new StreamBuilder(    stream: feed.stream, // this is a Stream<List<Product>>    builder: (context, snapshot) {      if (!snapshot.hasData)        return const Text('Loading products');      return new ListView.builder(          itemCount: snapshot.data.length,          itemBuilder: (context, index) {            Product product = snapshot.data[index];            return new ProductWidget(product);          });    });

Viewing all articles
Browse latest Browse all 790

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>