blob: 6773d9e713986bc2f84d75eb4acd79213a8d9c2f [file] [log] [blame]
>>>
List<dynamic> _generateUsedComponentReferences(
Globals globals, FormComponent component) {
return component.children == null
? <dynamic>[]
: component.children.map<List<dynamic>>((c) {
final globalComponent = globals.components.firstWhere(
(c) => c.id == component.component.componentId,
orElse: () => null);
<
dynamic>[
reference(globalComponent.className, globalComponent.importPath)
]..addAll(_generateUsedComponentReferences(globals, c));
}).toList();
}
<<<
List<dynamic> _generateUsedComponentReferences(
Globals globals, FormComponent component) {
return component.children == null
? <dynamic>[]
: component.children.map<List<dynamic>>((c) {
final globalComponent = globals.components.firstWhere(
(c) => c.id == component.component.componentId,
orElse: () => null);
<dynamic>[
reference(globalComponent.className, globalComponent.importPath)
]..addAll(_generateUsedComponentReferences(globals, c));
}).toList();
}