edite event and block of schdual to accept code and functionOn as dynamic

This commit is contained in:
Rafeek-Khoudare
2025-06-27 17:56:12 +03:00
parent 26e8ff7ee2
commit e365aa3faa
2 changed files with 5 additions and 3 deletions

View File

@ -265,7 +265,7 @@ class ScheduleBloc extends Bloc<ScheduleEvent, ScheduleState> {
category: event.category,
deviceId: deviceId,
time: getTimeStampWithoutSeconds(dateTime).toString(),
code: event.category,
code: event.code ?? event.category,
value: event.functionOn,
days: event.selectedDays);
if (success) {

View File

@ -70,17 +70,19 @@ class ScheduleAddEvent extends ScheduleEvent {
final String category;
final String time;
final List<String> selectedDays;
final bool functionOn;
final dynamic functionOn;
final String? code;
const ScheduleAddEvent({
required this.category,
required this.time,
required this.selectedDays,
required this.functionOn,
required this.code,
});
@override
List<Object> get props => [category, time, selectedDays, functionOn];
List<Object?> get props => [category, time, selectedDays, functionOn, code];
}
class ScheduleEditEvent extends ScheduleEvent {