EmailSignInWidget constructor

const EmailSignInWidget({
  1. EmailAuthController? controller,
  2. ServerpodClientShared? client,
  3. EmailFlowScreen startScreen = EmailFlowScreen.startRegistration,
  4. VerificationCodeConfig verificationCodeConfig = const VerificationCodeConfig(),
  5. void emailValidation(
    1. String email
    )?,
  6. List<PasswordRequirement>? passwordRequirements,
  7. VoidCallback? onAuthenticated,
  8. dynamic onError(
    1. Object error
    )?,
  9. VoidCallback? onTermsAndConditionsPressed,
  10. VoidCallback? onPrivacyPolicyPressed,
  11. 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.',
     );