NearHuscarl / flutter_login

Provides login screen with login/signup functionalities to help speed up development
MIT License
1.49k stars 796 forks source link

onConfirmSignup accepts null for success whereas onLogin, onSignUp accepts empty string for success #444

Open tushxr16 opened 1 year ago

tushxr16 commented 1 year ago

Describe the bug To maintain consistency with the existing functions which accept empty string as a measure of success, the onConfirmSignup should also follow the same behavior.

To Reproduce Steps to reproduce the behavior:

  1. Go to FlutterLogin( onConfirmSignup: (String code, LoginData data) => _onConfirmSignup(context, code, data) )
  2. onConfirmSignup code should be like this to maintain consistency with other functions Future<String> _onConfirmSignup( BuildContext context, String code, LoginData data) async { // logic return ''; }
  3. Instead we have to in following way Future<String?> _onConfirmSignup( BuildContext context, String code, LoginData data) async { // logic return null; }