mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
add table view
This commit is contained in:
@ -75,8 +75,7 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
BoxDecoration(color: Colors.grey[200]),
|
||||
child: Row(
|
||||
children: [
|
||||
if (widget.withCheckBox)
|
||||
_buildSelectAllCheckbox(),
|
||||
if (widget.withCheckBox) _buildSelectAllCheckbox(),
|
||||
...widget.headers
|
||||
.map((header) => _buildTableHeaderCell(header))
|
||||
.toList(),
|
||||
@ -93,10 +92,11 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
final row = widget.data[index];
|
||||
return Row(
|
||||
children: [
|
||||
if (widget.withCheckBox)
|
||||
_buildRowCheckbox(index),
|
||||
...row.map((cell) =>
|
||||
_buildTableCell(cell.toString())).toList(),
|
||||
if (widget.withCheckBox) _buildRowCheckbox(index),
|
||||
...row
|
||||
.map((cell) =>
|
||||
_buildTableCell(cell.toString()))
|
||||
.toList(),
|
||||
],
|
||||
);
|
||||
},
|
||||
@ -143,7 +143,10 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(title, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
child: Text(title,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.lightGreyColor)),
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -156,11 +159,11 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: ColorsManager.boxDivider,
|
||||
width: 1.0,
|
||||
),
|
||||
)),
|
||||
bottom: BorderSide(
|
||||
color: ColorsManager.boxDivider,
|
||||
width: 1.0,
|
||||
),
|
||||
)),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
content,
|
||||
|
Reference in New Issue
Block a user