SignIn Screen ============= The SignIn screen is the first point of user interaction for authentication in the SailPilot app. It provides users with a form to enter their credentials and access the application. Layout and Widgets ------------------ - **Text Fields**: Includes email and password fields with respective `TextEditingController`s for user input. - **PrimaryButton**: A custom button widget used for the sign-in action. It is wrapped inside a `ShakeWidget` to provide a shake animation on certain conditions (like invalid credentials). - **Social Sign-In Options**: Offers alternative sign-in methods using social media accounts (Google, Facebook, Apple). Authentication Process ---------------------- Upon tapping the sign-in button, the app: - Validates the input fields to ensure they are not empty. - Calls the `login` method from `AuthService` to authenticate the user. - If authentication is successful, updates the `AuthState` and navigates to the `LandingPage`. - If there are issues (like invalid credentials), triggers a shake animation and clears the input fields. Dark Mode Support ----------------- The screen adjusts its background color and other UI elements based on the current theme (light or dark mode). User Feedback ------------- - Displays a loading indicator during the authentication process. - Shows a `SnackBar` with an error message if the authentication fails or if the input fields are empty. Navigation to SignUp Screen --------------------------- Includes a text button that navigates users to the `SignUp` screen for new account creation. .. note:: The SignIn screen is crucial for user experience, providing a straightforward and visually appealing interface for users to access their accounts in SailPilot.