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 (anonymousProfilePhoto != null) {
    referencesCollector.add(ModelReference(PublicMediumModel.packageName,
        PublicMediumModel.id, anonymousProfilePhoto!));
  }
  if (logo != null) {
    referencesCollector.add(ModelReference(
        PublicMediumModel.packageName, PublicMediumModel.id, logo!));
  }
  if (anonymousProfilePhoto != null) {
    referencesCollector
        .addAll(await anonymousProfilePhoto!.collectReferences(appId: appId));
  }
  if (homePages != null) {
    referencesCollector
        .addAll(await homePages!.collectReferences(appId: appId));
  }
  if (logo != null) {
    referencesCollector.addAll(await logo!.collectReferences(appId: appId));
  }
  return referencesCollector;
}