signUp method
[Future<[void>]]
Initiates the sign-up process.
Handles the sign-up process by performing the following steps:
- Unfocusing the current focus scope.
- Setting the view state to
ViewState.busy
. - Setting validation mode to
AutovalidateMode.always
. - Setting the view state to
ViewState.idle
. - Validating the form using the form key.
- If validation is successful, disabling auto-validation mode and initiating the sign-up.
- Displaying a custom progress dialog during sign-up.
- Initializing database functions.
- Performing a GraphQL mutation to register the user with provided details (first name, last name, email, password).
- Handling the result of the sign-up operation:
- Updating the current user with the received data.
- Refreshing the access token.
- Joining a public organization or sending a membership request based on the selected organization.
In case of any exceptions during the sign-up process, this function catches and prints the error and displays a Talawa error snackbar with a corresponding message.
params: None
returns: None
Implementation
Future<void> async
- talawa
- signup_details_view_model
- SignupDetailsViewModel
- signUp method