Firebase provides a bunch of awesome services such as Firestore, Auth, Cloud Storage, Cloud Functions and Cloud Messaging. Learn how to use them in this tutorial course in which we’re making a fully fledged real-time chat app with everything you’d expect like sending images and getting notifications when we receive a new message.

In this part you will learn how to set up the accounts of your users. We will create a User class and save it to Firestore database. We will also use Firebase Cloud Storage to save the profile picture.

This post contains all the code that’s been written in this YouTube video.

 

To get the code check out this GitHub repository: https://github.com/ResoCoder/firebase-firestore-chat-app

About the author 

Matt Rešetár

Matt is an app developer with a knack for teaching others. Working as a Flutter freelancer and most importantly developer educator, he doesn't have a lot of free time 😅 Yet he still manages to squeeze in tough workouts 💪 and guitar 🎸

You may also like

Flutter Custom & Staggered Page Transition Animation Tutorial

Flutter Firebase & DDD Course [5] – Sign-In Form Logic

  • doest work at all
    fun initCurrentUserIfFirstTime(onComplete: () -> Unit) {
    currentUserDocRef.get().addOnSuccessListener { documentSnapshot ->
    if (!documentSnapshot.exists()) {
    val newUser = User(FirebaseAuth.getInstance().currentUser?.displayName ?: “”,
    “”, null, mutableListOf())
    currentUserDocRef.set(newUser).addOnSuccessListener {
    onComplete()
    }
    }
    else
    onComplete()
    }
    }

    type inference failed mutablelistOf
    none of the following fuctions can be called with the arguments supplied

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
    >