EmailSignInWidget constructor
const
EmailSignInWidget({
- EmailAuthController? controller,
- ServerpodClientShared? client,
- EmailFlowScreen startScreen = EmailFlowScreen.startRegistration,
- VerificationCodeConfig verificationCodeConfig = const VerificationCodeConfig(),
- void emailValidation(
- String email
- List<
PasswordRequirement> ? passwordRequirements, - VoidCallback? onAuthenticated,
- dynamic onError(
- Object error
- VoidCallback? onTermsAndConditionsPressed,
- VoidCallback? onPrivacyPolicyPressed,
- Key? key,
Creates an email sign-in widget.
Implementation
const EmailSignInWidget({
this.controller,
this.client,
this.startScreen = EmailFlowScreen.startRegistration,
this.verificationCodeConfig = const VerificationCodeConfig(),
this.emailValidation,
this.passwordRequirements,
this.onAuthenticated,
this.onError,
this.onTermsAndConditionsPressed,
this.onPrivacyPolicyPressed,
super.key,
}) : assert(
(controller == null) != (client == null),
'Either controller or client must be provided, but not both. When '
'passing a controller, client, startScreen, onAuthenticated, and '
'onError parameters are ignored.',
),
assert(
(onAuthenticated == null && onError == null) || controller == null,
'Do not provide onAuthenticated or onError when using a controller '
'as they will be handled by the controller and will be ignored.',
);