Flutter, keep track of your receipts on Firebase! (2nd part)


To begin, you’ll need a few plugins.

  • Image Picker: This allows the user to select an image file from their device or take a new picture using their camera
  • Firebase Storage: Allows the app to access the Cloud Storage for this Firebase project
  • Cloud Firestore: This allows the app to use the Cloud Firestore API
  • Firebase Core: Mandatory plugin for using Firebase products

The class

So if you read my previous post on that matter, I was referring to

onPressed: () => Navigator.pushNamed(context,router.UPLOAD_IMAGE_FIR_STORAGE
await FirebaseFirestore.instance.collection("images").doc("doc_$timestamp").set({"url": downloadUrl,"gsc": gcsReference,"name": "$fileName _$timestamp.pdf","timestamp": "$timestamp","status": "pending"}).then((value) => print("Document added"))



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store