Revert "formatted all files."

This reverts commit 04250ebc98.
This commit is contained in:
Faris Armoush
2025-06-12 16:04:49 +03:00
parent 218f43bacb
commit c642ba2644
473 changed files with 4335 additions and 5417 deletions

View File

@ -41,8 +41,7 @@ class ReportsTable extends StatelessWidget {
height: 100,
child: Text(
'No reports found',
style: context.textTheme.bodyLarge!
.copyWith(color: ColorsManager.grayColor),
style: context.textTheme.bodyLarge!.copyWith(color: ColorsManager.grayColor),
),
)
: Stack(
@ -50,8 +49,7 @@ class ReportsTable extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(20.0),
child: Table(
border:
TableBorder.all(color: Colors.grey.shade300, width: 1),
border: TableBorder.all(color: Colors.grey.shade300, width: 1),
columnWidths: const {
0: FlexColumnWidth(),
1: FlexColumnWidth(),
@ -68,36 +66,28 @@ class ReportsTable extends StatelessWidget {
),
if (report.data != null)
...report.data!.asMap().entries.map((entry) {
final index = entry.key;
final data = entry.value;
int index = entry.key;
DeviceEvent data = entry.value;
// Parse eventTime into Date and Time
final eventDateTime =
DateTime.fromMillisecondsSinceEpoch(
data.eventTime!);
final date =
DateFormat('dd/MM/yyyy').format(eventDateTime);
final time = DateFormat('HH:mm').format(eventDateTime);
DateTime eventDateTime =
DateTime.fromMillisecondsSinceEpoch(data.eventTime!);
String date = DateFormat('dd/MM/yyyy').format(eventDateTime);
String time = DateFormat('HH:mm').format(eventDateTime);
String value;
if (hideValueShowDescription == true) {
if (mainDoorSensor != null &&
mainDoorSensor == true) {
if (mainDoorSensor != null && mainDoorSensor == true) {
value = data.value == 'true' ? 'Open' : 'Close';
} else if (garageDoorSensor != null &&
garageDoorSensor == true) {
} else if (garageDoorSensor != null && garageDoorSensor == true) {
value = data.value == 'true' ? 'Opened' : 'Closed';
} else if (waterLeak != null && waterLeak == true) {
value = data.value == 'normal'
? 'Normal'
: 'Leak Detected';
value = data.value == 'normal' ? 'Normal' : 'Leak Detected';
} else {
value =
'${data.value!} ${thirdColumnDescription ?? ''}';
value = '${data.value!} ${thirdColumnDescription ?? ''}';
}
} else {
value =
'${data.value!} ${thirdColumnDescription ?? ''}';
value = '${data.value!} ${thirdColumnDescription ?? ''}';
}
return TableRow(