LoginFunnel class
Constructors
LoginFunnel ({Key ? key , Widget ? loadingWidget , Widget ? backWidget , void onClose ()?, bool onNameValidation (String )?, bool onEmailValidation (String )?, bool onPasswordValidation (String )?, required Future <bool > onAuthSubmit (LoginModel )?, void onFinish (LoginModel )?, Widget registerOrConnectBuilder (BuildContext , void onRegister (), void onConnect () )?, Widget titleBuilder (BuildContext , LoginStep )?, Widget actionsBuilder (BuildContext , LoginStep , LoginModel )?, Widget nextBuilder (BuildContext , LoginStep , void onNext () )?, Widget progressBarBuilder (BuildContext , LoginStep )? })
const
Properties
actionsBuilder
→ (Widget Function(BuildContext , LoginStep , LoginModel ) ?)
This is to build actions button for by step.
final
backWidget
→ Widget ?
This widget will be show as back button.
final
hashCode
→ int
The hash code for this object.
no setter inherited
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
loadingWidget
→ Widget ?
This widget will be show when it's loading state.
final
nextBuilder
→ (Widget Function(BuildContext , LoginStep , void onNext () ) ?)
This is to have a custom next button for each step
final
onAuthSubmit
→ (Future <bool > Function(LoginModel ) ?)
Where you have to call your Authentification service provider with the email/password (and name if it's a registration)
if the provider doesn't accept you can return false to stop the tunnel otherwise true
Tips: don't forget to popup a snackbar to explain why the provider didn't accepte.
final
onClose
→ (void Function() ?)
This function is call when the user try to back at the first step.
final
onEmailValidation
→ (bool Function(String ) ?)
this validation function is to validate the Email if it's return false it's will don't go next.
final
onFinish
→ (void Function(LoginModel ) ?)
When the the user is logged in
If you use Auth stream strategy this is no needed.
final
onNameValidation
→ (bool Function(String ) ?)
this validation function is to validate the Name if it's return false it's will don't go next.
final
onPasswordValidation
→ (bool Function(String ) ?)
this validation function is to validate the Password if it's return false it's will don't go next.
final
progressBarBuilder
→ (Widget Function(BuildContext , LoginStep ) ?)
This will show the progress of the funnel in the top for the user to know what's going on.
final
registerOrConnectBuilder
→ (Widget Function(BuildContext , void onRegister (), void onConnect () ) ?)
This will be show in the first step to as the use to connect or login
use onConnect to call login and onRegister to register an user.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
titleBuilder
→ (Widget Function(BuildContext , LoginStep ) ?)
This will be show in the top for each step.
final
flutter_login_funnel 0.1.1