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

SINSO Weekly Newsletter

What happens when you type ls -l in the shell?

Swagger Codegen Templating for okta auth

The Sixth PoD Governance Cycle Has Ended!

Getting started with Go — Loops

Test a Spring Boot GraphQL API

How to run localhost on your mobile devices.

Microservice Deployment Strategy (Part 1: Service Instance per Container Pattern)

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

Flutter Kisumu 2021 Events Highlights

Flutter- Single child scroll view

IgnorePointer & AbsorbPointer In Flutter.

Flutter, Flame and Android TV a.k.a The Good, The Bad and The Ugly.