mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-26 17:54:55 +00:00
Remove unused copyWith method from Status class and simplify status assignment in ScheduleBloc
This commit is contained in:
@ -298,15 +298,6 @@ class ScheduleBloc extends Bloc<ScheduleEvent, ScheduleState> {
|
||||
}
|
||||
|
||||
final dateTime = DateTime.parse(event.time);
|
||||
Status status = Status(code: '', value: '');
|
||||
if (event.category == 'CUR_2') {
|
||||
status = status.copyWith(
|
||||
code: 'control',
|
||||
value: event.functionOn == true ? 'open' : 'close');
|
||||
} else {
|
||||
status =
|
||||
status.copyWith(code: event.category, value: event.functionOn);
|
||||
}
|
||||
final updatedSchedule = ScheduleEntry(
|
||||
scheduleId: event.scheduleId,
|
||||
category: event.category,
|
||||
|
||||
Reference in New Issue
Block a user