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

Setup

  • 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

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"))

--

--

--

Ramblings of an agile enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Kind of Software Engineer Are You?

Webflow; A Love-Hate Relationship

《Resident Evil》系列三款名作的新主機版現已發售!

Bitwise Operators In JAVA

Fortnite Aim Courses Codes List — Best Aim Practice Maps

Fortnite Aim Courses Codes List - Best Aim Practice Maps

MVC (Model View Controller)

Getting Started with Systers and Google Summer of Code

C static libraries.

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
Alexandre Claus

Alexandre Claus

Ramblings of an agile enthusiast

More from Medium

Using WebView with Flutter

How to use Flutter Firebase Authentication

Quick looking into Dart — Dart Programming

Scrollable Widget in Flutter -How to choose.