SignUp Screen

The SignUp screen in SailPilot allows new users to register for an account. It presents a form for users to enter their personal details and create new credentials.

Layout and Widgets

  • Text Fields: The screen contains input fields for first name, last name, email, username, and password. Each field is managed by its own TextEditingController.

  • PrimaryButton: A custom button used for initiating the sign-up process. It includes a shake animation (ShakeWidget) for visual feedback during certain conditions, like form validation failures.

  • Form Validation: The form fields are validated in real-time, enabling the sign-up button when all fields are filled.

Registration Process

  • Upon tapping the sign-up button, the app validates the form and makes a request to the AuthService to register the user.

  • If the registration is successful, the user’s authentication state is updated and they are navigated to the LandingPage.

  • In case of any errors (like duplicate email), the form shakes, and an error message is displayed using a SnackBar.

Dark Mode Support

  • The screen adapts its color scheme based on the current theme (light or dark mode).