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); }); });