from static method
Implementation
static View from(YamlMap map) {
String title = map['title'];
var list = map['items'];
List<WidgetView> items = [];
Map<String, WidgetView> idWidgetMap = HashMap<String, WidgetView>();
if (list != null) {
for (final YamlMap item in list) {
//a. *Where are you going : Auto-complete
item.forEach((k, v) {
var arr = k.split('.');
String id = arr[0];
String label = arr[1];
WidgetView? wv = WidgetViewFactory.getWidgetView(v, id, label, null);
if (wv != null) {
items.add(wv);
idWidgetMap[id] = wv;
}
});
}
}
return View(title, items, idWidgetMap);
}