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

@ -58,8 +58,7 @@ class ScheduleEntry {
String toJson() => json.encode(toMap());
factory ScheduleEntry.fromJson(String source) =>
ScheduleEntry.fromMap(json.decode(source));
factory ScheduleEntry.fromJson(String source) => ScheduleEntry.fromMap(json.decode(source));
@override
bool operator ==(Object other) {
@ -74,9 +73,6 @@ class ScheduleEntry {
@override
int get hashCode {
return category.hashCode ^
time.hashCode ^
function.hashCode ^
days.hashCode;
return category.hashCode ^ time.hashCode ^ function.hashCode ^ days.hashCode;
}
}

View File

@ -1,8 +1,7 @@
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_status.dart';
import 'package:flutter/foundation.dart';
class ScheduleModel {
final String scheduleId;
@ -94,8 +93,8 @@ class ScheduleModel {
static List<String> convertSelectedDaysToStrings(List<bool> selectedDays) {
const allDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
final result = <String>[];
for (var i = 0; i < selectedDays.length; i++) {
List<String> result = [];
for (int i = 0; i < selectedDays.length; i++) {
if (selectedDays[i]) {
result.add(allDays[i]);
}

View File

@ -16,7 +16,7 @@ class WaterHeaterStatusModel extends Equatable {
final String cycleTiming;
final List<ScheduleModel> schedules;
const WaterHeaterStatusModel({
const WaterHeaterStatusModel({
required this.uuid,
required this.heaterSwitch,
required this.countdownHours,
@ -30,13 +30,13 @@ class WaterHeaterStatusModel extends Equatable {
});
factory WaterHeaterStatusModel.fromJson(String id, List<Status> jsonList) {
late var heaterSwitch = false;
late var countdownInSeconds = 0;
late var relayStatus = '';
late var cycleTiming = '';
late var scheduleMode = ScheduleModes.countdown;
late bool heaterSwitch = false;
late int countdownInSeconds = 0;
late String relayStatus = '';
late String cycleTiming = '';
late ScheduleModes scheduleMode = ScheduleModes.countdown;
for (final status in jsonList) {
for (var status in jsonList) {
switch (status.code) {
case 'switch_1':
heaterSwitch = status.value ?? false;