td function
The <td> HTML element defines a cell of a table that contains data and may be used as a child of the <tr> element.
colspan
: Contains a non-negative integer value that indicates how many columns the data cell spans or extends. The default value is 1. User agents dismiss values higher than 1000 as incorrect, setting to the default value (1).headers
: Contains a list of space-separated strings, each corresponding to the id attribute of the <th> elements that provide headings for this table cell.rowspan
: Contains a non-negative integer value that indicates for how many rows the data cell spans or extends. The default value is 1; if its value is set to 0, it extends until the end of the table grouping section (<thead>, <tbody>, <tfoot>, even if implicitly defined), that the cell belongs to. Values higher than 65534 are clipped to 65534.
Implementation
Component td(List<Component> children,
{int? colspan,
String? headers,
int? rowspan,
Key? key,
String? id,
String? classes,
Styles? styles,
Map<String, String>? attributes,
Map<String, EventCallback>? events}) {
return DomComponent(
tag: 'td',
key: key,
id: id,
classes: classes,
styles: styles,
attributes: {
...attributes ?? {},
if (colspan != null) 'colspan': '$colspan',
if (headers != null) 'headers': headers,
if (rowspan != null) 'rowspan': '$rowspan',
},
events: events,
children: children,
);
}