Display item details from Cloud Firestore(Firebase) in Flutter

1. Create a new file inside lib : recipe_details.dart

2. Create a stateless widget inside this file

3. Add a field to hold the document id to be passed from list screen

4. Return a Scaffold with an AppBar from the

5. Get the collection reference ‘Recipes’

6. Add a FutureBuilder to the body of the Scaffold

7. Provide the future

8. Implement the builder function

9. Load this widget when an item from the recipe list has been clicked

Complete Code (recipe_details.dart)

Leave a Reply

Your email address will not be published. Required fields are marked *