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 (photo != null) {
    referencesCollector.add(ModelReference(
        PublicMediumModel.packageName, PublicMediumModel.id, photo!));
  }
  if (subscriptions != null) {
    for (var item in subscriptions!) {
      referencesCollector.addAll(await item.collectReferences(appId: appId));
    }
  }
  if (photo != null) {
    referencesCollector.addAll(await photo!.collectReferences(appId: appId));
  }
  return referencesCollector;
}