requestEmailChange method
Future<void>
requestEmailChange(
- String email,
- String password, {
- String? externalToken,
- String? authID,
- required void onSuccess(),
- required void onError(
- SyneriseError error
The function requestEmailChange sends a request to change the user's email address.
Args: email (String): The email parameter is a string that represents the new email address that the user wants to change to. password (String): The password parameter is a string that represents the user's current password. externalToken (String): The externalToken parameter is an optional string that represents an external token used for authentication. authID (String): The authID parameter is an optional parameter that represents the authentication ID of the user.
Implementation
Future<void> requestEmailChange(String email, String password,
{String? externalToken,
String? authID,
required void Function() onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<void> result = await _methods.requestEmailChange(
email, password, externalToken, authID);
result.onSuccess((result) {
onSuccess();
}).onError((error) {
onError(error);
});
}