Flutter Auth Flow | Firebase_auth mail auth

as we all want some good looking login view in our app, but problem comes your apps needs logging in every-time you open your app šæā¦
but no fear, when we are here š.
first we need to setup firebase in our app and then add two plugin in our app..
firebase_core: ^1.14.0
firebase_auth: ^3.3.12
but remeber to use latest versions, now letās get into CODE.

Main function of app
first we initalize firebase though options are to be used only if you use flutterfire-cli to initalize firebase
then follows our MyApp class:

MyApp stateless widget for flutter
we return a new wrapper called AuthWrapper
which we will create now:

now we create a auth wrapper to return home screen acording to data in user returned by firebase.
now our login screen:

first we create a new statefull widget and initaze controllers for screen in it:

we return this widget from it, its simple two text fields and a button to sign in with email and password.
now, our full code for this screen:

now lets move in to home screen:

when we are on home screen we just show a button to signout from account..
now i create a new user in firebase console. and try itā¦
Written by:
see you soon.. š