create method
Create Account
Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the /account/verfication route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new account session.
Implementation
Future<models.Account> create(
{required String userId,
required String email,
required String password,
String? name}) async {
const String path = '/account';
final Map<String, dynamic> params = {
'userId': userId,
'email': email,
'password': password,
'name': name,
};
final Map<String, String> headers = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: path, params: params, headers: headers);
return models.Account.fromMap(res.data);
}