collectReferences method
Implementation
@override
Future<List<ModelReference>> collectReferences({String? appId}) async {
List<ModelReference> referencesCollector = [];
if (appBar != null) {
referencesCollector.add(
ModelReference(AppBarModel.packageName, AppBarModel.id, appBar!));
}
if (drawer != null) {
referencesCollector.add(
ModelReference(DrawerModel.packageName, DrawerModel.id, drawer!));
}
if (endDrawer != null) {
referencesCollector.add(
ModelReference(DrawerModel.packageName, DrawerModel.id, endDrawer!));
}
if (homeMenu != null) {
referencesCollector.add(ModelReference(
HomeMenuModel.packageName, HomeMenuModel.id, homeMenu!));
}
if (gridView != null) {
referencesCollector.add(ModelReference(
GridViewModel.packageName, GridViewModel.id, gridView!));
}
if (appBar != null) {
referencesCollector.addAll(await appBar!.collectReferences(appId: appId));
}
if (drawer != null) {
referencesCollector.addAll(await drawer!.collectReferences(appId: appId));
}
if (endDrawer != null) {
referencesCollector
.addAll(await endDrawer!.collectReferences(appId: appId));
}
if (homeMenu != null) {
referencesCollector
.addAll(await homeMenu!.collectReferences(appId: appId));
}
if (bodyComponents != null) {
for (var item in bodyComponents!) {
referencesCollector.addAll(await item.collectReferences(appId: appId));
}
}
if (backgroundOverride != null) {
referencesCollector
.addAll(await backgroundOverride!.collectReferences(appId: appId));
}
if (gridView != null) {
referencesCollector
.addAll(await gridView!.collectReferences(appId: appId));
}
if (conditions != null) {
referencesCollector
.addAll(await conditions!.collectReferences(appId: appId));
}
return referencesCollector;
}