toRenderableList method
Implementation
List<dynamic>? toRenderableList(Object? list,
[DOMContext<UINode>? domContext]) {
if (list == null) return null;
List<dynamic> renderableList;
if (list is List) {
if (list.runtimeType == _listDynamicRuntimeType) {
renderableList = list;
} else {
renderableList = List<dynamic>.from(list);
}
} else if (list is Iterable) {
renderableList = List<dynamic>.from(list);
} else if (list is Map) {
renderableList = <dynamic>[];
for (var entry in list.entries) {
var key = entry.key;
var val = entry.value;
if (isRenderable(key)) {
renderableList.add(key);
}
if (isRenderable(val) || isHTMLElement(val)) {
renderableList.add(val);
}
}
} else {
renderableList = <dynamic>[list];
}
return renderableList;
}