How can I pass data from one screen to another as a stream?
I have a screen showing list of products using Firebase Stream (StreamProvider) when I click on a product I want to go to anther screen where I can display the product details. I want to pass the list of products to the details page as stream so any changes I make on the details screen will automatically update the firestore document.
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ProductDetails(
products: products
)));
},
On the product details screen I can only get the products as List<Product>
instead of Stream<List<Product>>