confirmPhoneUpdate method
Future<void>
confirmPhoneUpdate(
- String phone,
- String confirmationCode,
- bool smsAgreement, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
The function confirmPhoneUpdate takes in a phone number, confirmation code, and SMS agreement,
and calls a private method to confirm the phone update.
Args: phone (String): A string representing the new phone number that the user wants to update to. confirmationCode (String): The confirmation code is a string that is used to verify the phone number update. smsAgreement (bool): A boolean value indicating whether the user has agreed to receive SMS notifications or not.
Implementation
Future<void> confirmPhoneUpdate(
String phone, String confirmationCode, bool smsAgreement,
{required void Function() onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<void> result = await _methods.confirmPhoneUpdate(
phone, confirmationCode, smsAgreement);
result.onSuccess((result) {
onSuccess();
}).onError((error) {
onError(error);
});
}