// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark part of 'holidays_state.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$HolidaysState implements DiagnosticableTreeMixin { bool get showPastHolidays; bool get showDisclaimer; List get holidays; /// Create a copy of HolidaysState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $HolidaysStateCopyWith get copyWith => _$HolidaysStateCopyWithImpl(this as HolidaysState, _$identity); /// Serializes this HolidaysState to a JSON map. Map toJson(); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties ..add(DiagnosticsProperty('type', 'HolidaysState')) ..add(DiagnosticsProperty('showPastHolidays', showPastHolidays))..add(DiagnosticsProperty('showDisclaimer', showDisclaimer))..add(DiagnosticsProperty('holidays', holidays)); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is HolidaysState&&(identical(other.showPastHolidays, showPastHolidays) || other.showPastHolidays == showPastHolidays)&&(identical(other.showDisclaimer, showDisclaimer) || other.showDisclaimer == showDisclaimer)&&const DeepCollectionEquality().equals(other.holidays, holidays)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,showPastHolidays,showDisclaimer,const DeepCollectionEquality().hash(holidays)); @override String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)'; } } /// @nodoc abstract mixin class $HolidaysStateCopyWith<$Res> { factory $HolidaysStateCopyWith(HolidaysState value, $Res Function(HolidaysState) _then) = _$HolidaysStateCopyWithImpl; @useResult $Res call({ bool showPastHolidays, bool showDisclaimer, List holidays }); } /// @nodoc class _$HolidaysStateCopyWithImpl<$Res> implements $HolidaysStateCopyWith<$Res> { _$HolidaysStateCopyWithImpl(this._self, this._then); final HolidaysState _self; final $Res Function(HolidaysState) _then; /// Create a copy of HolidaysState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? showPastHolidays = null,Object? showDisclaimer = null,Object? holidays = null,}) { return _then(_self.copyWith( showPastHolidays: null == showPastHolidays ? _self.showPastHolidays : showPastHolidays // ignore: cast_nullable_to_non_nullable as bool,showDisclaimer: null == showDisclaimer ? _self.showDisclaimer : showDisclaimer // ignore: cast_nullable_to_non_nullable as bool,holidays: null == holidays ? _self.holidays : holidays // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [HolidaysState]. extension HolidaysStatePatterns on HolidaysState { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _HolidaysState value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _HolidaysState() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _HolidaysState value) $default,){ final _that = this; switch (_that) { case _HolidaysState(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _HolidaysState value)? $default,){ final _that = this; switch (_that) { case _HolidaysState() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( bool showPastHolidays, bool showDisclaimer, List holidays)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _HolidaysState() when $default != null: return $default(_that.showPastHolidays,_that.showDisclaimer,_that.holidays);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( bool showPastHolidays, bool showDisclaimer, List holidays) $default,) {final _that = this; switch (_that) { case _HolidaysState(): return $default(_that.showPastHolidays,_that.showDisclaimer,_that.holidays);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( bool showPastHolidays, bool showDisclaimer, List holidays)? $default,) {final _that = this; switch (_that) { case _HolidaysState() when $default != null: return $default(_that.showPastHolidays,_that.showDisclaimer,_that.holidays);case _: return null; } } } /// @nodoc @JsonSerializable() class _HolidaysState with DiagnosticableTreeMixin implements HolidaysState { const _HolidaysState({required this.showPastHolidays, required this.showDisclaimer, required final List holidays}): _holidays = holidays; factory _HolidaysState.fromJson(Map json) => _$HolidaysStateFromJson(json); @override final bool showPastHolidays; @override final bool showDisclaimer; final List _holidays; @override List get holidays { if (_holidays is EqualUnmodifiableListView) return _holidays; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_holidays); } /// Create a copy of HolidaysState /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$HolidaysStateCopyWith<_HolidaysState> get copyWith => __$HolidaysStateCopyWithImpl<_HolidaysState>(this, _$identity); @override Map toJson() { return _$HolidaysStateToJson(this, ); } @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties ..add(DiagnosticsProperty('type', 'HolidaysState')) ..add(DiagnosticsProperty('showPastHolidays', showPastHolidays))..add(DiagnosticsProperty('showDisclaimer', showDisclaimer))..add(DiagnosticsProperty('holidays', holidays)); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _HolidaysState&&(identical(other.showPastHolidays, showPastHolidays) || other.showPastHolidays == showPastHolidays)&&(identical(other.showDisclaimer, showDisclaimer) || other.showDisclaimer == showDisclaimer)&&const DeepCollectionEquality().equals(other._holidays, _holidays)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,showPastHolidays,showDisclaimer,const DeepCollectionEquality().hash(_holidays)); @override String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)'; } } /// @nodoc abstract mixin class _$HolidaysStateCopyWith<$Res> implements $HolidaysStateCopyWith<$Res> { factory _$HolidaysStateCopyWith(_HolidaysState value, $Res Function(_HolidaysState) _then) = __$HolidaysStateCopyWithImpl; @override @useResult $Res call({ bool showPastHolidays, bool showDisclaimer, List holidays }); } /// @nodoc class __$HolidaysStateCopyWithImpl<$Res> implements _$HolidaysStateCopyWith<$Res> { __$HolidaysStateCopyWithImpl(this._self, this._then); final _HolidaysState _self; final $Res Function(_HolidaysState) _then; /// Create a copy of HolidaysState /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? showPastHolidays = null,Object? showDisclaimer = null,Object? holidays = null,}) { return _then(_HolidaysState( showPastHolidays: null == showPastHolidays ? _self.showPastHolidays : showPastHolidays // ignore: cast_nullable_to_non_nullable as bool,showDisclaimer: null == showDisclaimer ? _self.showDisclaimer : showDisclaimer // ignore: cast_nullable_to_non_nullable as bool,holidays: null == holidays ? _self._holidays : holidays // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$Holiday implements DiagnosticableTreeMixin { String get start; String get end; int get year; String get stateCode; String get name; String get slug; /// Create a copy of Holiday /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $HolidayCopyWith get copyWith => _$HolidayCopyWithImpl(this as Holiday, _$identity); /// Serializes this Holiday to a JSON map. Map toJson(); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties ..add(DiagnosticsProperty('type', 'Holiday')) ..add(DiagnosticsProperty('start', start))..add(DiagnosticsProperty('end', end))..add(DiagnosticsProperty('year', year))..add(DiagnosticsProperty('stateCode', stateCode))..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('slug', slug)); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Holiday&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.year, year) || other.year == year)&&(identical(other.stateCode, stateCode) || other.stateCode == stateCode)&&(identical(other.name, name) || other.name == name)&&(identical(other.slug, slug) || other.slug == slug)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,start,end,year,stateCode,name,slug); @override String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'Holiday(start: $start, end: $end, year: $year, stateCode: $stateCode, name: $name, slug: $slug)'; } } /// @nodoc abstract mixin class $HolidayCopyWith<$Res> { factory $HolidayCopyWith(Holiday value, $Res Function(Holiday) _then) = _$HolidayCopyWithImpl; @useResult $Res call({ String start, String end, int year, String stateCode, String name, String slug }); } /// @nodoc class _$HolidayCopyWithImpl<$Res> implements $HolidayCopyWith<$Res> { _$HolidayCopyWithImpl(this._self, this._then); final Holiday _self; final $Res Function(Holiday) _then; /// Create a copy of Holiday /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? start = null,Object? end = null,Object? year = null,Object? stateCode = null,Object? name = null,Object? slug = null,}) { return _then(_self.copyWith( start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable as String,end: null == end ? _self.end : end // ignore: cast_nullable_to_non_nullable as String,year: null == year ? _self.year : year // ignore: cast_nullable_to_non_nullable as int,stateCode: null == stateCode ? _self.stateCode : stateCode // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,slug: null == slug ? _self.slug : slug // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [Holiday]. extension HolidayPatterns on Holiday { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _Holiday value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Holiday() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _Holiday value) $default,){ final _that = this; switch (_that) { case _Holiday(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _Holiday value)? $default,){ final _that = this; switch (_that) { case _Holiday() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String start, String end, int year, String stateCode, String name, String slug)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Holiday() when $default != null: return $default(_that.start,_that.end,_that.year,_that.stateCode,_that.name,_that.slug);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String start, String end, int year, String stateCode, String name, String slug) $default,) {final _that = this; switch (_that) { case _Holiday(): return $default(_that.start,_that.end,_that.year,_that.stateCode,_that.name,_that.slug);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String start, String end, int year, String stateCode, String name, String slug)? $default,) {final _that = this; switch (_that) { case _Holiday() when $default != null: return $default(_that.start,_that.end,_that.year,_that.stateCode,_that.name,_that.slug);case _: return null; } } } /// @nodoc @JsonSerializable() class _Holiday with DiagnosticableTreeMixin implements Holiday { const _Holiday({required this.start, required this.end, required this.year, required this.stateCode, required this.name, required this.slug}); factory _Holiday.fromJson(Map json) => _$HolidayFromJson(json); @override final String start; @override final String end; @override final int year; @override final String stateCode; @override final String name; @override final String slug; /// Create a copy of Holiday /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$HolidayCopyWith<_Holiday> get copyWith => __$HolidayCopyWithImpl<_Holiday>(this, _$identity); @override Map toJson() { return _$HolidayToJson(this, ); } @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties ..add(DiagnosticsProperty('type', 'Holiday')) ..add(DiagnosticsProperty('start', start))..add(DiagnosticsProperty('end', end))..add(DiagnosticsProperty('year', year))..add(DiagnosticsProperty('stateCode', stateCode))..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('slug', slug)); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Holiday&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.year, year) || other.year == year)&&(identical(other.stateCode, stateCode) || other.stateCode == stateCode)&&(identical(other.name, name) || other.name == name)&&(identical(other.slug, slug) || other.slug == slug)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,start,end,year,stateCode,name,slug); @override String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'Holiday(start: $start, end: $end, year: $year, stateCode: $stateCode, name: $name, slug: $slug)'; } } /// @nodoc abstract mixin class _$HolidayCopyWith<$Res> implements $HolidayCopyWith<$Res> { factory _$HolidayCopyWith(_Holiday value, $Res Function(_Holiday) _then) = __$HolidayCopyWithImpl; @override @useResult $Res call({ String start, String end, int year, String stateCode, String name, String slug }); } /// @nodoc class __$HolidayCopyWithImpl<$Res> implements _$HolidayCopyWith<$Res> { __$HolidayCopyWithImpl(this._self, this._then); final _Holiday _self; final $Res Function(_Holiday) _then; /// Create a copy of Holiday /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? start = null,Object? end = null,Object? year = null,Object? stateCode = null,Object? name = null,Object? slug = null,}) { return _then(_Holiday( start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable as String,end: null == end ? _self.end : end // ignore: cast_nullable_to_non_nullable as String,year: null == year ? _self.year : year // ignore: cast_nullable_to_non_nullable as int,stateCode: null == stateCode ? _self.stateCode : stateCode // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,slug: null == slug ? _self.slug : slug // ignore: cast_nullable_to_non_nullable as String, )); } } // dart format on