SignupInitBlock
Used to initiate a sign up.
The goal of this block is to ask the user for a unique identifier (currently only email is supported) and an optional name (we call this a fullname at Corbado). The corresponding screen will thus be shown when a user starts a new signup in your app.
Available block data
Stores signup initialization details like fullName
, email
, and primaryLoading
.
Available block methods
navigateToLogin()
: Redirects users to the login screen.submitSignupInit({String? email, String? fullName}) async
: Initiates the signup process with optional email and full name.
Implementation Steps
Create Signup Screen
Create a new screen that implements the SignupInitBlock
interface. This screen will handle the initial signup process.
Set Up Controllers
Initialize text controllers for the email and full name input fields, pre-populated with any existing values.
Create Input Fields
Implement text fields for email and full name input with proper styling.
Add Navigation and Action Buttons
Implement buttons for navigating to login and submitting the signup form.