mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
edite event and block of schdual to accept code and functionOn as dynamic
This commit is contained in:
@ -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) {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user