mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +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,
|
category: event.category,
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
time: getTimeStampWithoutSeconds(dateTime).toString(),
|
time: getTimeStampWithoutSeconds(dateTime).toString(),
|
||||||
code: event.category,
|
code: event.code ?? event.category,
|
||||||
value: event.functionOn,
|
value: event.functionOn,
|
||||||
days: event.selectedDays);
|
days: event.selectedDays);
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -70,17 +70,19 @@ class ScheduleAddEvent extends ScheduleEvent {
|
|||||||
final String category;
|
final String category;
|
||||||
final String time;
|
final String time;
|
||||||
final List<String> selectedDays;
|
final List<String> selectedDays;
|
||||||
final bool functionOn;
|
final dynamic functionOn;
|
||||||
|
final String? code;
|
||||||
|
|
||||||
const ScheduleAddEvent({
|
const ScheduleAddEvent({
|
||||||
required this.category,
|
required this.category,
|
||||||
required this.time,
|
required this.time,
|
||||||
required this.selectedDays,
|
required this.selectedDays,
|
||||||
required this.functionOn,
|
required this.functionOn,
|
||||||
|
required this.code,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [category, time, selectedDays, functionOn];
|
List<Object?> get props => [category, time, selectedDays, functionOn, code];
|
||||||
}
|
}
|
||||||
|
|
||||||
class ScheduleEditEvent extends ScheduleEvent {
|
class ScheduleEditEvent extends ScheduleEvent {
|
||||||
|
Reference in New Issue
Block a user