createUser method
Create a user
This function sends a request to the API client to create a user. If the request is successful, it returns void. In case of an error, the error is recorded in Crashlytics and the error is rethrown.
data The data to create the user with.
Throws an error if the request fails for any reason.
Implementation
Future<void> createUser(User data) =>
_apiClient.createUser(data.mapToRequest()).catchError((error) {
_crashlytics?.recordError(error, StackTrace.current);
throw error;
});