socialConnections method

  1. @override
Future<UserSocialConnections> socialConnections()
override

Implementation

@override
Future<UserSocialConnections> socialConnections() async {
try {
  final resultPromise = passage.currentUser.listSocialConnections();
  final jsObject = await js_util.promiseToFuture(resultPromise);
  final dartObject = js_util.dartify(jsObject);
  final Map<String, dynamic> dartMap = _convertToMapStringDynamic(dartObject as Map);
  return UserSocialConnections.fromMap(dartMap);
} catch (e) {
  throw PassageError.fromObject(
    object: e,
    overrideCode: PassageErrorCode.socialConnectionError,
  );
}
}