collectReferences method

  1. @override
Future<List<ModelReference>> collectReferences({
  1. String? appId,
})
override

Implementation

@override
Future<List<ModelReference>> collectReferences({String? appId}) async {
  List<ModelReference> referencesCollector = [];
  if (follower != null) {
    referencesCollector.add(ModelReference(MemberPublicInfoModel.packageName,
        MemberPublicInfoModel.id, follower!));
  }
  if (followed != null) {
    referencesCollector.add(ModelReference(MemberPublicInfoModel.packageName,
        MemberPublicInfoModel.id, followed!));
  }
  if (follower != null) {
    referencesCollector
        .addAll(await follower!.collectReferences(appId: appId));
  }
  if (followed != null) {
    referencesCollector
        .addAll(await followed!.collectReferences(appId: appId));
  }
  return referencesCollector;
}