startRegistration method

Future<void> startRegistration()

Starts the registration process for a new user with email only.

Validates the email and transitions to the set password screen. On failure, transitions to error state with the error message.

Implementation

Future<void> startRegistration() async {
  await runGuarded(() async {
    final email = emailController.text.trim();
    emailValidation.call(email);
    requestId = await emailEndpoint.startRegistration(email: email);
    return EmailFlowScreen.verifyRegistration;
  });
}