Skip to content

azizoglu/FirebaseLoginExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Firebase Login Example

In this app, I have implemented Firebase Authantication login and sign up for both Android and iOS.

Step by Step Flutter Firebase Login

Step 1: Firebase Setup

Create a project in Firebase Console and complete the Firebase setup for both Android and IOS. You will get two files for each platform when finish the setup.

  • For Android:
    • Place the "google-service.json" file in the app module root directory.
    • Add classpath project level build.gradle
    • Add this lines app level build.gradle apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services'
  • For IOS:
    • Place the "google-service.json" file in the app module root directory.

Step 2: Install Plugins

Install a few plugins before you start. Add the plugins to your package's pubspec.yaml file.

  • Firebase Authentication:
  • Other Plugins:
    • The google_fonts package for Flutter allows you to easily use any of the 977 fonts (and their variants) from fonts.google.com in your Flutter app.
    • With provider plugin we can listen user authantication changes.

Step 3: Create UI

Step 3: Create Authentication Class

Create a new dart file auth.dart where we will set up the firebase authentication and google sign in.

Step 4: Create User Model Class

Create a new dart file user.dart for user data.

Screenshots

GCS