onSuccessCallbackBeInvokedByChild method

  1. @override
Function0<void> onSuccessCallbackBeInvokedByChild(
  1. dynamic user,
  2. BuildContext context,
  3. Map<String, dynamic> data
)
override

Implementation

@override
Function0<void> onSuccessCallbackBeInvokedByChild(
    User user, BuildContext context, Map<String, dynamic> data) {
  return () {
    if (!config.emailVerificationRequired) {
      onSuccess(user, context, data);
    } else {
      Navigator.of(context).push(MaterialPageRoute(
          builder: (context) => EmailVerify(
                onSuccess: () {
                  onSuccess(user, context, data);
                },
              )));
    }
  };
}