getDualTableCheckListRows method
Creates a table row with two items in a dual-column layout.
Used within Table widgets to create rows with two cells, commonly for checklist or comparison layouts.
Parameters:
item: Widget for the first column.secondItem: Widget for the second column.firstItemPadding: Padding around the first item (defaults to 1.0).secondItemPadding: Padding around the second item (defaults to 1.0).secondItemLeftPadding: Left padding for the second item (defaults to 5.0).
Returns a TableRow with two cells.
Example:
Table(
children: [
getDualTableCheckListRows(
Checkbox(value: true, onChanged: null),
Text('Task 1'),
),
],
)
Implementation
TableRow getDualTableCheckListRows(Widget item, Widget secondItem,
{double firstItemPadding = 1.0,
double secondItemPadding = 1.0,
double secondItemLeftPadding = 5.0}) {
return TableRow(
children: [
Row(
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(firstItemPadding),
child: item,
),
)
],
),
Expanded(
child: Padding(
padding: EdgeInsets.all(secondItemPadding),
child: secondItem,
))
],
);
}