NearHuscarl / flutter_login

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

The minimum setup causes Null check error #426

Open benedict1986 opened 1 year ago

benedict1986 commented 1 year ago

Describe the bug

When I use the minimum setup, I get Null check operator used on a null value error when enter the credentials and click the login button

To Reproduce Steps to reproduce the behavior:

Use the following code

class UserAuthenticationPage extends StatelessWidget {
  const UserAuthenticationPage({super.key});

  @override
  Widget build(BuildContext context) {
    return FlutterLogin(onLogin: (_) async {
      return '';
    }, onRecoverPassword: (_) async {
      return '';
    });
  }
}

and enter the credentails and click the login button, I am given the Null check operator used on a null value error with the stacktrace

E/flutter (11025): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
E/flutter (11025): #0      AuthCardState._changeToCard.<anonymous closure>.<anonymous closure> (package:flutter_login/src/widgets/cards/auth_card_builder.dart:350:41)
E/flutter (11025): <asynchronous suspension>

Expected behavior

Nothing should be done because there is no implementation in login function

Screenshots

image

Information (please complete the following information):

Additional context

N/A