import 'package:equatable/equatable.dart'; import 'package:syncrow_app/features/scene/enum/effective_period_options.dart'; class EffectPeriodState extends Equatable { final EnumEffectivePeriodOptions selectedPeriod; final String selectedDaysBinary; final String? customStartTime; final String? customEndTime; const EffectPeriodState({ required this.selectedPeriod, required this.selectedDaysBinary, this.customStartTime, this.customEndTime, }); factory EffectPeriodState.initial() { return const EffectPeriodState( selectedPeriod: EnumEffectivePeriodOptions.allDay, selectedDaysBinary: "1111111", // All days selected customStartTime: "00:00", customEndTime: "23:59", ); } EffectPeriodState copyWith({ EnumEffectivePeriodOptions? selectedPeriod, String? selectedDaysBinary, String? customStartTime, String? customEndTime, }) { return EffectPeriodState( selectedPeriod: selectedPeriod ?? this.selectedPeriod, selectedDaysBinary: selectedDaysBinary ?? this.selectedDaysBinary, customStartTime: customStartTime ?? this.customStartTime, customEndTime: customEndTime ?? this.customEndTime, ); } @override List get props => [selectedPeriod, selectedDaysBinary, customStartTime, customEndTime]; }