mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
push fixes
This commit is contained in:
@ -65,11 +65,14 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
decoration: widget.headerDecoration ?? BoxDecoration(color: Colors.grey[200]),
|
||||
decoration: widget.headerDecoration ??
|
||||
BoxDecoration(color: Colors.grey[200]),
|
||||
child: Row(
|
||||
children: [
|
||||
if (widget.withCheckBox) _buildSelectAllCheckbox(),
|
||||
...widget.headers.map((header) => _buildTableHeaderCell(header)).toList(),
|
||||
...widget.headers
|
||||
.map((header) => _buildTableHeaderCell(header))
|
||||
.toList(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -93,7 +96,8 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(color: ColorsManager.grayColor),
|
||||
.copyWith(
|
||||
color: ColorsManager.grayColor),
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -113,10 +117,12 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
return Row(
|
||||
children: [
|
||||
if (widget.withCheckBox)
|
||||
_buildRowCheckbox(index, widget.size.height * 0.10),
|
||||
_buildRowCheckbox(
|
||||
index, widget.size.height * 0.10),
|
||||
...row
|
||||
.map((cell) =>
|
||||
_buildTableCell(cell.toString(), widget.size.height * 0.10))
|
||||
.map((cell) => _buildTableCell(
|
||||
cell.toString(),
|
||||
widget.size.height * 0.10))
|
||||
.toList(),
|
||||
],
|
||||
);
|
||||
@ -222,7 +228,7 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
statusColor = ColorsManager.red;
|
||||
break;
|
||||
default:
|
||||
statusColor = Colors.black; // Default color
|
||||
statusColor = Colors.black;
|
||||
}
|
||||
|
||||
return Expanded(
|
||||
@ -241,9 +247,11 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
child: Text(
|
||||
content,
|
||||
style: TextStyle(
|
||||
color: batteryLevel != null && batteryLevel < 20
|
||||
color: (batteryLevel != null && batteryLevel < 20)
|
||||
? ColorsManager.red
|
||||
: statusColor, // Use the passed color or default to black
|
||||
: (batteryLevel != null && batteryLevel > 20)
|
||||
? ColorsManager.green
|
||||
: statusColor,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
|
Reference in New Issue
Block a user