changeEmail method

  1. @override
Future<String> changeEmail(
  1. String newEmail
)
override

Implementation

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