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 (feedFront != null) {
    referencesCollector.add(ModelReference(
        FeedFrontModel.packageName, FeedFrontModel.id, feedFront!));
  }
  if (bodyComponentsCurrentMember != null) {
    for (var item in bodyComponentsCurrentMember!) {
      referencesCollector.addAll(await item.collectReferences(appId: appId));
    }
  }
  if (bodyComponentsOtherMember != null) {
    for (var item in bodyComponentsOtherMember!) {
      referencesCollector.addAll(await item.collectReferences(appId: appId));
    }
  }
  if (itemColor != null) {
    referencesCollector
        .addAll(await itemColor!.collectReferences(appId: appId));
  }
  if (selectedItemColor != null) {
    referencesCollector
        .addAll(await selectedItemColor!.collectReferences(appId: appId));
  }
  if (backgroundOverride != null) {
    referencesCollector
        .addAll(await backgroundOverride!.collectReferences(appId: appId));
  }
  if (feedFront != null) {
    referencesCollector
        .addAll(await feedFront!.collectReferences(appId: appId));
  }
  if (conditions != null) {
    referencesCollector
        .addAll(await conditions!.collectReferences(appId: appId));
  }
  return referencesCollector;
}