flutter_login
flutter_login copied to clipboard
[FEATURE] (super fast fix) add onSwitchSignUpAdditionalData as a parameter to the FlutterLogin widget
Is your feature request related to a problem? Please describe.
In my app, I use the onSignup
callback to make sure that the email entered by the user is unique (by checking with my database). However, I also use an additionalSignUpField
for the user to to choose a username. This is a problem as the onSignup
callback is only called after the user taps "confirm" on the additionalSignUpField page, so then the user would have to tap on the "back" button to go back and pick a different email.
Describe the solution you'd like
This is easily fixed by adding a onSwitchSignUpAdditionalData parameter, which would require a Function
that returns String?
. It can be called at line 182 in the login_card
file, and have the error be cleanly caught by the preexisting showError
thing at line 195.