collectReferences method

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

Implementation

Future<List<ModelReference>> collectReferences({String? appId}) async {
  List<ModelReference> referencesCollector = [];
  if (backgroundImage != null) {
    referencesCollector.add(ModelReference(PublicMediumModel.packageName,
        PublicMediumModel.id, backgroundImage!));
  }
  if (backgroundImage != null) {
    referencesCollector
        .addAll(await backgroundImage!.collectReferences(appId: appId));
  }
  if (shadow != null) {
    referencesCollector.addAll(await shadow!.collectReferences(appId: appId));
  }
  if (decorationColors != null) {
    for (var item in decorationColors!) {
      referencesCollector.addAll(await item.collectReferences(appId: appId));
    }
  }
  if (borderRadius != null) {
    referencesCollector
        .addAll(await borderRadius!.collectReferences(appId: appId));
  }
  if (padding != null) {
    referencesCollector
        .addAll(await padding!.collectReferences(appId: appId));
  }
  if (margin != null) {
    referencesCollector.addAll(await margin!.collectReferences(appId: appId));
  }
  return referencesCollector;
}