$table function
Creates a table node.
Implementation
TABLEElement $table({
Object? id,
Object? classes,
Object? style,
Object? thsStyle,
Object? tdsStyle,
Object? trsStyle,
Map<String, String>? attributes,
Object? caption,
Object? head,
Object? body,
Object? foot,
bool? hidden,
bool commented = false,
}) {
var tableElement = TABLEElement(
id: id,
classes: classes,
style: style,
attributes: attributes,
caption: caption,
head: head,
body: body,
foot: foot,
hidden: hidden,
commented: commented,
);
if (thsStyle != null) {
var css = CSS(thsStyle);
tableElement.selectAllByType<THElement>().forEach(
(e) => e.style.putAllIfAbsent(css.entries),
);
}
if (tdsStyle != null) {
var css = CSS(tdsStyle);
tableElement.selectAllByType<TDElement>().forEach(
(e) => e.style.putAllIfAbsent(css.entries),
);
}
if (trsStyle != null) {
var css = CSS(trsStyle);
tableElement.selectAllByType<TRowElement>().forEach(
(e) => e.style.putAllIfAbsent(css.entries),
);
}
return tableElement;
}