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 (menu != null) {
    referencesCollector.add(
        ModelReference(MenuDefModel.packageName, MenuDefModel.id, menu!));
  }
  if (backgroundOverride != null) {
    referencesCollector
        .addAll(await backgroundOverride!.collectReferences(appId: appId));
  }
  if (popupMenuBackgroundColor != null) {
    referencesCollector.addAll(
        await popupMenuBackgroundColor!.collectReferences(appId: appId));
  }
  if (headerBackgroundOverride != null) {
    referencesCollector.addAll(
        await headerBackgroundOverride!.collectReferences(appId: appId));
  }
  if (popupMenuBackgroundColorOverride != null) {
    referencesCollector.addAll(await popupMenuBackgroundColorOverride!
        .collectReferences(appId: appId));
  }
  if (menu != null) {
    referencesCollector.addAll(await menu!.collectReferences(appId: appId));
  }
  return referencesCollector;
}