changePhone method

  1. @override
Future<String> changePhone(
  1. String newPhone
)
override

Implementation

@override
Future<String> changePhone(String newPhone) async {
  try {
    final resultPromise = passage.getCurrentUser().changePhone(newPhone);
    final jsObject = await js_util.promiseToFuture(resultPromise);
    return jsObject.id;
  } catch (e) {
    throw PassageError.fromObject(
        object: e, overrideCode: PassageErrorCode.changeEmailError);
  }
}