namedList method
dynamic
namedList(
- String tag,
- dynamic naMap,
- Map? methodMap,
- BuildContext context,
- Domain? domain,
- List v,
Implementation
dynamic namedList(String tag, dynamic naMap, Map? methodMap,
BuildContext context, Domain? domain, List v) {
var children = [];
v.forEach((e) {
var item;
if (e is Map) {
var body;
item = (body = replaceMethod(methodMap, e['className'])) != null
? convert(context, body, methodMap, domain: domain)
: convert(context, e, methodMap, domain: domain);
} else if (e is String) {
if (domain != null && domain.match(e)) {
item = domain.bindValue(e);
} else {
var body;
if ((body = replaceMethod(methodMap, e)) != null) {
item = convert(context, body, methodMap, domain: domain);
} else {
item = namedString(tag, naMap, methodMap, context, domain, e).data;
}
}
} else {
item = e;
}
children.add(item);
});
if (children.every((element) => element is Widget) == true) {
return children.asIteratorOf<Widget>()?.toList() ?? children;
}
return children;
}