In this app, I have implemented Firebase Authantication login and sign up for both Android and iOS.
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'
- Add this lines app level build.gradle
- For IOS:
-
- Place the "google-service.json" file in the app module root directory.
-
- Follow this step for IOS integration google_sign_in.
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.
-
- For loading animation flutter_spinkit.
Create a new dart file auth.dart where we will set up the firebase authentication and google sign in.
Create a new dart file user.dart for user data.