// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package // 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 'widget_data.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND // dart format off T _$identity(T value) => value; /// @nodoc mixin _$WidgetLesson { DateTime get start; DateTime get end; String get subjectShort; String? get subjectLong; String? get room;/// On teacher accounts this carries the class label ("7a") instead of the /// teacher short name — see `WidgetDataMapper` `showClassInsteadOfTeacher`; /// [originalTeacher] is null in that case. String? get teacher; String? get originalTeacher; WidgetLessonStatus get status; String? get customColor;/// Fertig aufgelöste Kachelfarbe als `#RRGGBB`. Native Renderer kennen die /// Paletten nicht — Änderungen daran brauchen so keinen nativen Eingriff. String? get color; int get siblingCount; /// Create a copy of WidgetLesson /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $WidgetLessonCopyWith get copyWith => _$WidgetLessonCopyWithImpl(this as WidgetLesson, _$identity); /// Serializes this WidgetLesson to a JSON map. Map toJson(); @override bool operator ==(Object other) { final _this = this as WidgetLesson; return identical(this, other) || (other.runtimeType == runtimeType&&other is WidgetLesson&&(identical(other.start, _this.start) || other.start == _this.start)&&(identical(other.end, _this.end) || other.end == _this.end)&&(identical(other.subjectShort, _this.subjectShort) || other.subjectShort == _this.subjectShort)&&(identical(other.subjectLong, _this.subjectLong) || other.subjectLong == _this.subjectLong)&&(identical(other.room, _this.room) || other.room == _this.room)&&(identical(other.teacher, _this.teacher) || other.teacher == _this.teacher)&&(identical(other.originalTeacher, _this.originalTeacher) || other.originalTeacher == _this.originalTeacher)&&(identical(other.status, _this.status) || other.status == _this.status)&&(identical(other.customColor, _this.customColor) || other.customColor == _this.customColor)&&(identical(other.color, _this.color) || other.color == _this.color)&&(identical(other.siblingCount, _this.siblingCount) || other.siblingCount == _this.siblingCount)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { final _this = this as WidgetLesson; return Object.hash(runtimeType,_this.start,_this.end,_this.subjectShort,_this.subjectLong,_this.room,_this.teacher,_this.originalTeacher,_this.status,_this.customColor,_this.color,_this.siblingCount); } @override String toString() { final _this = this as WidgetLesson; return 'WidgetLesson(start: ${_this.start}, end: ${_this.end}, subjectShort: ${_this.subjectShort}, subjectLong: ${_this.subjectLong}, room: ${_this.room}, teacher: ${_this.teacher}, originalTeacher: ${_this.originalTeacher}, status: ${_this.status}, customColor: ${_this.customColor}, color: ${_this.color}, siblingCount: ${_this.siblingCount})'; } } /// @nodoc abstract mixin class $WidgetLessonCopyWith<$Res> { factory $WidgetLessonCopyWith(WidgetLesson value, $Res Function(WidgetLesson) _then) = _$WidgetLessonCopyWithImpl; @useResult $Res call({ DateTime start, DateTime end, String subjectShort, String? subjectLong, String? room, String? teacher, String? originalTeacher, WidgetLessonStatus status, String? customColor, String? color, int siblingCount }); } /// @nodoc class _$WidgetLessonCopyWithImpl<$Res> implements $WidgetLessonCopyWith<$Res> { _$WidgetLessonCopyWithImpl(this._self, this._then); final WidgetLesson _self; final $Res Function(WidgetLesson) _then; /// Create a copy of WidgetLesson /// 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? subjectShort = null,Object? subjectLong = freezed,Object? room = freezed,Object? teacher = freezed,Object? originalTeacher = freezed,Object? status = null,Object? customColor = freezed,Object? color = freezed,Object? siblingCount = null,}) { return _then(WidgetLesson( start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable as DateTime,end: null == end ? _self.end : end // ignore: cast_nullable_to_non_nullable as DateTime,subjectShort: null == subjectShort ? _self.subjectShort : subjectShort // ignore: cast_nullable_to_non_nullable as String,subjectLong: freezed == subjectLong ? _self.subjectLong : subjectLong // ignore: cast_nullable_to_non_nullable as String?,room: freezed == room ? _self.room : room // ignore: cast_nullable_to_non_nullable as String?,teacher: freezed == teacher ? _self.teacher : teacher // ignore: cast_nullable_to_non_nullable as String?,originalTeacher: freezed == originalTeacher ? _self.originalTeacher : originalTeacher // ignore: cast_nullable_to_non_nullable as String?,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable as WidgetLessonStatus,customColor: freezed == customColor ? _self.customColor : customColor // ignore: cast_nullable_to_non_nullable as String?,color: freezed == color ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?,siblingCount: null == siblingCount ? _self.siblingCount : siblingCount // ignore: cast_nullable_to_non_nullable as int, )); } } /// Adds pattern-matching-related methods to [WidgetLesson]. extension WidgetLessonPatterns on WidgetLesson { /// 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( _WidgetLesson value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _WidgetLesson() 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( _WidgetLesson value) $default,){ final _that = this; switch (_that) { case _WidgetLesson(): 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( _WidgetLesson value)? $default,){ final _that = this; switch (_that) { case _WidgetLesson() 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( DateTime start, DateTime end, String subjectShort, String? subjectLong, String? room, String? teacher, String? originalTeacher, WidgetLessonStatus status, String? customColor, String? color, int siblingCount)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _WidgetLesson() when $default != null: return $default(_that.start,_that.end,_that.subjectShort,_that.subjectLong,_that.room,_that.teacher,_that.originalTeacher,_that.status,_that.customColor,_that.color,_that.siblingCount);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( DateTime start, DateTime end, String subjectShort, String? subjectLong, String? room, String? teacher, String? originalTeacher, WidgetLessonStatus status, String? customColor, String? color, int siblingCount) $default,) {final _that = this; switch (_that) { case _WidgetLesson(): return $default(_that.start,_that.end,_that.subjectShort,_that.subjectLong,_that.room,_that.teacher,_that.originalTeacher,_that.status,_that.customColor,_that.color,_that.siblingCount);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( DateTime start, DateTime end, String subjectShort, String? subjectLong, String? room, String? teacher, String? originalTeacher, WidgetLessonStatus status, String? customColor, String? color, int siblingCount)? $default,) {final _that = this; switch (_that) { case _WidgetLesson() when $default != null: return $default(_that.start,_that.end,_that.subjectShort,_that.subjectLong,_that.room,_that.teacher,_that.originalTeacher,_that.status,_that.customColor,_that.color,_that.siblingCount);case _: return null; } } } /// @nodoc @JsonSerializable() class _WidgetLesson implements WidgetLesson { const _WidgetLesson({required this.start, required this.end, required this.subjectShort, this.subjectLong, this.room, this.teacher, this.originalTeacher, required this.status, this.customColor, this.color, this.siblingCount = 0}); factory _WidgetLesson.fromJson(Map json) => _$WidgetLessonFromJson(json); @override final DateTime start; @override final DateTime end; @override final String subjectShort; @override final String? subjectLong; @override final String? room; /// On teacher accounts this carries the class label ("7a") instead of the /// teacher short name — see `WidgetDataMapper` `showClassInsteadOfTeacher`; /// [originalTeacher] is null in that case. @override final String? teacher; @override final String? originalTeacher; @override final WidgetLessonStatus status; @override final String? customColor; /// Fertig aufgelöste Kachelfarbe als `#RRGGBB`. Native Renderer kennen die /// Paletten nicht — Änderungen daran brauchen so keinen nativen Eingriff. @override final String? color; @override@JsonKey() final int siblingCount; /// Create a copy of WidgetLesson /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$WidgetLessonCopyWith<_WidgetLesson> get copyWith => __$WidgetLessonCopyWithImpl<_WidgetLesson>(this, _$identity); @override Map toJson() { return _$WidgetLessonToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _WidgetLesson&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.subjectShort, subjectShort) || other.subjectShort == subjectShort)&&(identical(other.subjectLong, subjectLong) || other.subjectLong == subjectLong)&&(identical(other.room, room) || other.room == room)&&(identical(other.teacher, teacher) || other.teacher == teacher)&&(identical(other.originalTeacher, originalTeacher) || other.originalTeacher == originalTeacher)&&(identical(other.status, status) || other.status == status)&&(identical(other.customColor, customColor) || other.customColor == customColor)&&(identical(other.color, color) || other.color == color)&&(identical(other.siblingCount, siblingCount) || other.siblingCount == siblingCount)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { return Object.hash(runtimeType,start,end,subjectShort,subjectLong,room,teacher,originalTeacher,status,customColor,color,siblingCount); } @override String toString() { return 'WidgetLesson(start: $start, end: $end, subjectShort: $subjectShort, subjectLong: $subjectLong, room: $room, teacher: $teacher, originalTeacher: $originalTeacher, status: $status, customColor: $customColor, color: $color, siblingCount: $siblingCount)'; } } /// @nodoc abstract mixin class _$WidgetLessonCopyWith<$Res> implements $WidgetLessonCopyWith<$Res> { factory _$WidgetLessonCopyWith(_WidgetLesson value, $Res Function(_WidgetLesson) _then) = __$WidgetLessonCopyWithImpl; @override @useResult $Res call({ DateTime start, DateTime end, String subjectShort, String? subjectLong, String? room, String? teacher, String? originalTeacher, WidgetLessonStatus status, String? customColor, String? color, int siblingCount }); } /// @nodoc class __$WidgetLessonCopyWithImpl<$Res> implements _$WidgetLessonCopyWith<$Res> { __$WidgetLessonCopyWithImpl(this._self, this._then); final _WidgetLesson _self; final $Res Function(_WidgetLesson) _then; /// Create a copy of WidgetLesson /// 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? subjectShort = null,Object? subjectLong = freezed,Object? room = freezed,Object? teacher = freezed,Object? originalTeacher = freezed,Object? status = null,Object? customColor = freezed,Object? color = freezed,Object? siblingCount = null,}) { return _then(_WidgetLesson( start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable as DateTime,end: null == end ? _self.end : end // ignore: cast_nullable_to_non_nullable as DateTime,subjectShort: null == subjectShort ? _self.subjectShort : subjectShort // ignore: cast_nullable_to_non_nullable as String,subjectLong: freezed == subjectLong ? _self.subjectLong : subjectLong // ignore: cast_nullable_to_non_nullable as String?,room: freezed == room ? _self.room : room // ignore: cast_nullable_to_non_nullable as String?,teacher: freezed == teacher ? _self.teacher : teacher // ignore: cast_nullable_to_non_nullable as String?,originalTeacher: freezed == originalTeacher ? _self.originalTeacher : originalTeacher // ignore: cast_nullable_to_non_nullable as String?,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable as WidgetLessonStatus,customColor: freezed == customColor ? _self.customColor : customColor // ignore: cast_nullable_to_non_nullable as String?,color: freezed == color ? _self.color : color // ignore: cast_nullable_to_non_nullable as String?,siblingCount: null == siblingCount ? _self.siblingCount : siblingCount // ignore: cast_nullable_to_non_nullable as int, )); } } /// @nodoc mixin _$WidgetPeriod { /// Webuntis period name — typically the lesson number as string ("1", /// "2", "3", …). Native renderers append a trailing "." for display. String get name;/// Minutes since midnight, e.g. 480 for 08:00. Cheap to read in /// Kotlin/Swift without re-parsing time strings. int get startMinutes; int get endMinutes;/// Position on the **virtual** time axis used by the widget. Small /// between-lesson gaps are squeezed out so periods stack flush; only /// big breaks (> 5 min) remain as visible gaps. Computed by the /// mapper so native renderers don't have to redo the maths. int get virtualStartMinutes; int get virtualEndMinutes; /// Create a copy of WidgetPeriod /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $WidgetPeriodCopyWith get copyWith => _$WidgetPeriodCopyWithImpl(this as WidgetPeriod, _$identity); /// Serializes this WidgetPeriod to a JSON map. Map toJson(); @override bool operator ==(Object other) { final _this = this as WidgetPeriod; return identical(this, other) || (other.runtimeType == runtimeType&&other is WidgetPeriod&&(identical(other.name, _this.name) || other.name == _this.name)&&(identical(other.startMinutes, _this.startMinutes) || other.startMinutes == _this.startMinutes)&&(identical(other.endMinutes, _this.endMinutes) || other.endMinutes == _this.endMinutes)&&(identical(other.virtualStartMinutes, _this.virtualStartMinutes) || other.virtualStartMinutes == _this.virtualStartMinutes)&&(identical(other.virtualEndMinutes, _this.virtualEndMinutes) || other.virtualEndMinutes == _this.virtualEndMinutes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { final _this = this as WidgetPeriod; return Object.hash(runtimeType,_this.name,_this.startMinutes,_this.endMinutes,_this.virtualStartMinutes,_this.virtualEndMinutes); } @override String toString() { final _this = this as WidgetPeriod; return 'WidgetPeriod(name: ${_this.name}, startMinutes: ${_this.startMinutes}, endMinutes: ${_this.endMinutes}, virtualStartMinutes: ${_this.virtualStartMinutes}, virtualEndMinutes: ${_this.virtualEndMinutes})'; } } /// @nodoc abstract mixin class $WidgetPeriodCopyWith<$Res> { factory $WidgetPeriodCopyWith(WidgetPeriod value, $Res Function(WidgetPeriod) _then) = _$WidgetPeriodCopyWithImpl; @useResult $Res call({ String name, int startMinutes, int endMinutes, int virtualStartMinutes, int virtualEndMinutes }); } /// @nodoc class _$WidgetPeriodCopyWithImpl<$Res> implements $WidgetPeriodCopyWith<$Res> { _$WidgetPeriodCopyWithImpl(this._self, this._then); final WidgetPeriod _self; final $Res Function(WidgetPeriod) _then; /// Create a copy of WidgetPeriod /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? startMinutes = null,Object? endMinutes = null,Object? virtualStartMinutes = null,Object? virtualEndMinutes = null,}) { return _then(WidgetPeriod( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,startMinutes: null == startMinutes ? _self.startMinutes : startMinutes // ignore: cast_nullable_to_non_nullable as int,endMinutes: null == endMinutes ? _self.endMinutes : endMinutes // ignore: cast_nullable_to_non_nullable as int,virtualStartMinutes: null == virtualStartMinutes ? _self.virtualStartMinutes : virtualStartMinutes // ignore: cast_nullable_to_non_nullable as int,virtualEndMinutes: null == virtualEndMinutes ? _self.virtualEndMinutes : virtualEndMinutes // ignore: cast_nullable_to_non_nullable as int, )); } } /// Adds pattern-matching-related methods to [WidgetPeriod]. extension WidgetPeriodPatterns on WidgetPeriod { /// 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( _WidgetPeriod value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _WidgetPeriod() 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( _WidgetPeriod value) $default,){ final _that = this; switch (_that) { case _WidgetPeriod(): 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( _WidgetPeriod value)? $default,){ final _that = this; switch (_that) { case _WidgetPeriod() 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 name, int startMinutes, int endMinutes, int virtualStartMinutes, int virtualEndMinutes)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _WidgetPeriod() when $default != null: return $default(_that.name,_that.startMinutes,_that.endMinutes,_that.virtualStartMinutes,_that.virtualEndMinutes);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 name, int startMinutes, int endMinutes, int virtualStartMinutes, int virtualEndMinutes) $default,) {final _that = this; switch (_that) { case _WidgetPeriod(): return $default(_that.name,_that.startMinutes,_that.endMinutes,_that.virtualStartMinutes,_that.virtualEndMinutes);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 name, int startMinutes, int endMinutes, int virtualStartMinutes, int virtualEndMinutes)? $default,) {final _that = this; switch (_that) { case _WidgetPeriod() when $default != null: return $default(_that.name,_that.startMinutes,_that.endMinutes,_that.virtualStartMinutes,_that.virtualEndMinutes);case _: return null; } } } /// @nodoc @JsonSerializable() class _WidgetPeriod implements WidgetPeriod { const _WidgetPeriod({required this.name, required this.startMinutes, required this.endMinutes, required this.virtualStartMinutes, required this.virtualEndMinutes}); factory _WidgetPeriod.fromJson(Map json) => _$WidgetPeriodFromJson(json); /// Webuntis period name — typically the lesson number as string ("1", /// "2", "3", …). Native renderers append a trailing "." for display. @override final String name; /// Minutes since midnight, e.g. 480 for 08:00. Cheap to read in /// Kotlin/Swift without re-parsing time strings. @override final int startMinutes; @override final int endMinutes; /// Position on the **virtual** time axis used by the widget. Small /// between-lesson gaps are squeezed out so periods stack flush; only /// big breaks (> 5 min) remain as visible gaps. Computed by the /// mapper so native renderers don't have to redo the maths. @override final int virtualStartMinutes; @override final int virtualEndMinutes; /// Create a copy of WidgetPeriod /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$WidgetPeriodCopyWith<_WidgetPeriod> get copyWith => __$WidgetPeriodCopyWithImpl<_WidgetPeriod>(this, _$identity); @override Map toJson() { return _$WidgetPeriodToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _WidgetPeriod&&(identical(other.name, name) || other.name == name)&&(identical(other.startMinutes, startMinutes) || other.startMinutes == startMinutes)&&(identical(other.endMinutes, endMinutes) || other.endMinutes == endMinutes)&&(identical(other.virtualStartMinutes, virtualStartMinutes) || other.virtualStartMinutes == virtualStartMinutes)&&(identical(other.virtualEndMinutes, virtualEndMinutes) || other.virtualEndMinutes == virtualEndMinutes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { return Object.hash(runtimeType,name,startMinutes,endMinutes,virtualStartMinutes,virtualEndMinutes); } @override String toString() { return 'WidgetPeriod(name: $name, startMinutes: $startMinutes, endMinutes: $endMinutes, virtualStartMinutes: $virtualStartMinutes, virtualEndMinutes: $virtualEndMinutes)'; } } /// @nodoc abstract mixin class _$WidgetPeriodCopyWith<$Res> implements $WidgetPeriodCopyWith<$Res> { factory _$WidgetPeriodCopyWith(_WidgetPeriod value, $Res Function(_WidgetPeriod) _then) = __$WidgetPeriodCopyWithImpl; @override @useResult $Res call({ String name, int startMinutes, int endMinutes, int virtualStartMinutes, int virtualEndMinutes }); } /// @nodoc class __$WidgetPeriodCopyWithImpl<$Res> implements _$WidgetPeriodCopyWith<$Res> { __$WidgetPeriodCopyWithImpl(this._self, this._then); final _WidgetPeriod _self; final $Res Function(_WidgetPeriod) _then; /// Create a copy of WidgetPeriod /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? startMinutes = null,Object? endMinutes = null,Object? virtualStartMinutes = null,Object? virtualEndMinutes = null,}) { return _then(_WidgetPeriod( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,startMinutes: null == startMinutes ? _self.startMinutes : startMinutes // ignore: cast_nullable_to_non_nullable as int,endMinutes: null == endMinutes ? _self.endMinutes : endMinutes // ignore: cast_nullable_to_non_nullable as int,virtualStartMinutes: null == virtualStartMinutes ? _self.virtualStartMinutes : virtualStartMinutes // ignore: cast_nullable_to_non_nullable as int,virtualEndMinutes: null == virtualEndMinutes ? _self.virtualEndMinutes : virtualEndMinutes // ignore: cast_nullable_to_non_nullable as int, )); } } /// @nodoc mixin _$WidgetDayInfo { DateTime get date; bool get isHoliday; String? get holidayName; /// Create a copy of WidgetDayInfo /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $WidgetDayInfoCopyWith get copyWith => _$WidgetDayInfoCopyWithImpl(this as WidgetDayInfo, _$identity); /// Serializes this WidgetDayInfo to a JSON map. Map toJson(); @override bool operator ==(Object other) { final _this = this as WidgetDayInfo; return identical(this, other) || (other.runtimeType == runtimeType&&other is WidgetDayInfo&&(identical(other.date, _this.date) || other.date == _this.date)&&(identical(other.isHoliday, _this.isHoliday) || other.isHoliday == _this.isHoliday)&&(identical(other.holidayName, _this.holidayName) || other.holidayName == _this.holidayName)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { final _this = this as WidgetDayInfo; return Object.hash(runtimeType,_this.date,_this.isHoliday,_this.holidayName); } @override String toString() { final _this = this as WidgetDayInfo; return 'WidgetDayInfo(date: ${_this.date}, isHoliday: ${_this.isHoliday}, holidayName: ${_this.holidayName})'; } } /// @nodoc abstract mixin class $WidgetDayInfoCopyWith<$Res> { factory $WidgetDayInfoCopyWith(WidgetDayInfo value, $Res Function(WidgetDayInfo) _then) = _$WidgetDayInfoCopyWithImpl; @useResult $Res call({ DateTime date, bool isHoliday, String? holidayName }); } /// @nodoc class _$WidgetDayInfoCopyWithImpl<$Res> implements $WidgetDayInfoCopyWith<$Res> { _$WidgetDayInfoCopyWithImpl(this._self, this._then); final WidgetDayInfo _self; final $Res Function(WidgetDayInfo) _then; /// Create a copy of WidgetDayInfo /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? date = null,Object? isHoliday = null,Object? holidayName = freezed,}) { return _then(WidgetDayInfo( date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable as DateTime,isHoliday: null == isHoliday ? _self.isHoliday : isHoliday // ignore: cast_nullable_to_non_nullable as bool,holidayName: freezed == holidayName ? _self.holidayName : holidayName // ignore: cast_nullable_to_non_nullable as String?, )); } } /// Adds pattern-matching-related methods to [WidgetDayInfo]. extension WidgetDayInfoPatterns on WidgetDayInfo { /// 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( _WidgetDayInfo value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _WidgetDayInfo() 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( _WidgetDayInfo value) $default,){ final _that = this; switch (_that) { case _WidgetDayInfo(): 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( _WidgetDayInfo value)? $default,){ final _that = this; switch (_that) { case _WidgetDayInfo() 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( DateTime date, bool isHoliday, String? holidayName)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _WidgetDayInfo() when $default != null: return $default(_that.date,_that.isHoliday,_that.holidayName);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( DateTime date, bool isHoliday, String? holidayName) $default,) {final _that = this; switch (_that) { case _WidgetDayInfo(): return $default(_that.date,_that.isHoliday,_that.holidayName);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( DateTime date, bool isHoliday, String? holidayName)? $default,) {final _that = this; switch (_that) { case _WidgetDayInfo() when $default != null: return $default(_that.date,_that.isHoliday,_that.holidayName);case _: return null; } } } /// @nodoc @JsonSerializable() class _WidgetDayInfo implements WidgetDayInfo { const _WidgetDayInfo({required this.date, this.isHoliday = false, this.holidayName}); factory _WidgetDayInfo.fromJson(Map json) => _$WidgetDayInfoFromJson(json); @override final DateTime date; @override@JsonKey() final bool isHoliday; @override final String? holidayName; /// Create a copy of WidgetDayInfo /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$WidgetDayInfoCopyWith<_WidgetDayInfo> get copyWith => __$WidgetDayInfoCopyWithImpl<_WidgetDayInfo>(this, _$identity); @override Map toJson() { return _$WidgetDayInfoToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _WidgetDayInfo&&(identical(other.date, date) || other.date == date)&&(identical(other.isHoliday, isHoliday) || other.isHoliday == isHoliday)&&(identical(other.holidayName, holidayName) || other.holidayName == holidayName)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { return Object.hash(runtimeType,date,isHoliday,holidayName); } @override String toString() { return 'WidgetDayInfo(date: $date, isHoliday: $isHoliday, holidayName: $holidayName)'; } } /// @nodoc abstract mixin class _$WidgetDayInfoCopyWith<$Res> implements $WidgetDayInfoCopyWith<$Res> { factory _$WidgetDayInfoCopyWith(_WidgetDayInfo value, $Res Function(_WidgetDayInfo) _then) = __$WidgetDayInfoCopyWithImpl; @override @useResult $Res call({ DateTime date, bool isHoliday, String? holidayName }); } /// @nodoc class __$WidgetDayInfoCopyWithImpl<$Res> implements _$WidgetDayInfoCopyWith<$Res> { __$WidgetDayInfoCopyWithImpl(this._self, this._then); final _WidgetDayInfo _self; final $Res Function(_WidgetDayInfo) _then; /// Create a copy of WidgetDayInfo /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? date = null,Object? isHoliday = null,Object? holidayName = freezed,}) { return _then(_WidgetDayInfo( date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable as DateTime,isHoliday: null == isHoliday ? _self.isHoliday : isHoliday // ignore: cast_nullable_to_non_nullable as bool,holidayName: freezed == holidayName ? _self.holidayName : holidayName // ignore: cast_nullable_to_non_nullable as String?, )); } } /// @nodoc mixin _$WidgetTimetableData { DateTime get fetchedAt;/// The day this widget snapshot is "about" — display anchor. /// For the day variant: the rendered school day. /// For the week variant: the Monday of the rendered school week. DateTime get anchorDate; List get lessons; List get periods; bool get isHoliday; String? get holidayName;/// Week payload only: one entry per day of the covered window. List get days; /// Create a copy of WidgetTimetableData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $WidgetTimetableDataCopyWith get copyWith => _$WidgetTimetableDataCopyWithImpl(this as WidgetTimetableData, _$identity); /// Serializes this WidgetTimetableData to a JSON map. Map toJson(); @override bool operator ==(Object other) { final _this = this as WidgetTimetableData; return identical(this, other) || (other.runtimeType == runtimeType&&other is WidgetTimetableData&&(identical(other.fetchedAt, _this.fetchedAt) || other.fetchedAt == _this.fetchedAt)&&(identical(other.anchorDate, _this.anchorDate) || other.anchorDate == _this.anchorDate)&&const DeepCollectionEquality().equals(other.lessons, _this.lessons)&&const DeepCollectionEquality().equals(other.periods, _this.periods)&&(identical(other.isHoliday, _this.isHoliday) || other.isHoliday == _this.isHoliday)&&(identical(other.holidayName, _this.holidayName) || other.holidayName == _this.holidayName)&&const DeepCollectionEquality().equals(other.days, _this.days)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { final _this = this as WidgetTimetableData; return Object.hash(runtimeType,_this.fetchedAt,_this.anchorDate,const DeepCollectionEquality().hash(_this.lessons),const DeepCollectionEquality().hash(_this.periods),_this.isHoliday,_this.holidayName,const DeepCollectionEquality().hash(_this.days)); } @override String toString() { final _this = this as WidgetTimetableData; return 'WidgetTimetableData(fetchedAt: ${_this.fetchedAt}, anchorDate: ${_this.anchorDate}, lessons: ${_this.lessons}, periods: ${_this.periods}, isHoliday: ${_this.isHoliday}, holidayName: ${_this.holidayName}, days: ${_this.days})'; } } /// @nodoc abstract mixin class $WidgetTimetableDataCopyWith<$Res> { factory $WidgetTimetableDataCopyWith(WidgetTimetableData value, $Res Function(WidgetTimetableData) _then) = _$WidgetTimetableDataCopyWithImpl; @useResult $Res call({ DateTime fetchedAt, DateTime anchorDate, List lessons, List periods, bool isHoliday, String? holidayName, List days }); } /// @nodoc class _$WidgetTimetableDataCopyWithImpl<$Res> implements $WidgetTimetableDataCopyWith<$Res> { _$WidgetTimetableDataCopyWithImpl(this._self, this._then); final WidgetTimetableData _self; final $Res Function(WidgetTimetableData) _then; /// Create a copy of WidgetTimetableData /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? fetchedAt = null,Object? anchorDate = null,Object? lessons = null,Object? periods = null,Object? isHoliday = null,Object? holidayName = freezed,Object? days = null,}) { return _then(WidgetTimetableData( fetchedAt: null == fetchedAt ? _self.fetchedAt : fetchedAt // ignore: cast_nullable_to_non_nullable as DateTime,anchorDate: null == anchorDate ? _self.anchorDate : anchorDate // ignore: cast_nullable_to_non_nullable as DateTime,lessons: null == lessons ? _self.lessons : lessons // ignore: cast_nullable_to_non_nullable as List,periods: null == periods ? _self.periods : periods // ignore: cast_nullable_to_non_nullable as List,isHoliday: null == isHoliday ? _self.isHoliday : isHoliday // ignore: cast_nullable_to_non_nullable as bool,holidayName: freezed == holidayName ? _self.holidayName : holidayName // ignore: cast_nullable_to_non_nullable as String?,days: null == days ? _self.days : days // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [WidgetTimetableData]. extension WidgetTimetableDataPatterns on WidgetTimetableData { /// 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( _WidgetTimetableData value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _WidgetTimetableData() 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( _WidgetTimetableData value) $default,){ final _that = this; switch (_that) { case _WidgetTimetableData(): 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( _WidgetTimetableData value)? $default,){ final _that = this; switch (_that) { case _WidgetTimetableData() 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( DateTime fetchedAt, DateTime anchorDate, List lessons, List periods, bool isHoliday, String? holidayName, List days)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _WidgetTimetableData() when $default != null: return $default(_that.fetchedAt,_that.anchorDate,_that.lessons,_that.periods,_that.isHoliday,_that.holidayName,_that.days);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( DateTime fetchedAt, DateTime anchorDate, List lessons, List periods, bool isHoliday, String? holidayName, List days) $default,) {final _that = this; switch (_that) { case _WidgetTimetableData(): return $default(_that.fetchedAt,_that.anchorDate,_that.lessons,_that.periods,_that.isHoliday,_that.holidayName,_that.days);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( DateTime fetchedAt, DateTime anchorDate, List lessons, List periods, bool isHoliday, String? holidayName, List days)? $default,) {final _that = this; switch (_that) { case _WidgetTimetableData() when $default != null: return $default(_that.fetchedAt,_that.anchorDate,_that.lessons,_that.periods,_that.isHoliday,_that.holidayName,_that.days);case _: return null; } } } /// @nodoc @JsonSerializable() class _WidgetTimetableData implements WidgetTimetableData { const _WidgetTimetableData({required this.fetchedAt, required this.anchorDate, required List lessons, List periods = const [], this.isHoliday = false, this.holidayName, List days = const []}): _lessons = lessons,_periods = periods,_days = days; factory _WidgetTimetableData.fromJson(Map json) => _$WidgetTimetableDataFromJson(json); @override final DateTime fetchedAt; /// The day this widget snapshot is "about" — display anchor. /// For the day variant: the rendered school day. /// For the week variant: the Monday of the rendered school week. @override final DateTime anchorDate; final List _lessons; @override List get lessons { if (_lessons is EqualUnmodifiableListView) return _lessons; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_lessons); } final List _periods; @override@JsonKey() List get periods { if (_periods is EqualUnmodifiableListView) return _periods; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_periods); } @override@JsonKey() final bool isHoliday; @override final String? holidayName; /// Week payload only: one entry per day of the covered window. final List _days; /// Week payload only: one entry per day of the covered window. @override@JsonKey() List get days { if (_days is EqualUnmodifiableListView) return _days; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_days); } /// Create a copy of WidgetTimetableData /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$WidgetTimetableDataCopyWith<_WidgetTimetableData> get copyWith => __$WidgetTimetableDataCopyWithImpl<_WidgetTimetableData>(this, _$identity); @override Map toJson() { return _$WidgetTimetableDataToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _WidgetTimetableData&&(identical(other.fetchedAt, fetchedAt) || other.fetchedAt == fetchedAt)&&(identical(other.anchorDate, anchorDate) || other.anchorDate == anchorDate)&&const DeepCollectionEquality().equals(other.lessons, _lessons)&&const DeepCollectionEquality().equals(other.periods, _periods)&&(identical(other.isHoliday, isHoliday) || other.isHoliday == isHoliday)&&(identical(other.holidayName, holidayName) || other.holidayName == holidayName)&&const DeepCollectionEquality().equals(other.days, _days)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { return Object.hash(runtimeType,fetchedAt,anchorDate,const DeepCollectionEquality().hash(_lessons),const DeepCollectionEquality().hash(_periods),isHoliday,holidayName,const DeepCollectionEquality().hash(_days)); } @override String toString() { return 'WidgetTimetableData(fetchedAt: $fetchedAt, anchorDate: $anchorDate, lessons: $lessons, periods: $periods, isHoliday: $isHoliday, holidayName: $holidayName, days: $days)'; } } /// @nodoc abstract mixin class _$WidgetTimetableDataCopyWith<$Res> implements $WidgetTimetableDataCopyWith<$Res> { factory _$WidgetTimetableDataCopyWith(_WidgetTimetableData value, $Res Function(_WidgetTimetableData) _then) = __$WidgetTimetableDataCopyWithImpl; @override @useResult $Res call({ DateTime fetchedAt, DateTime anchorDate, List lessons, List periods, bool isHoliday, String? holidayName, List days }); } /// @nodoc class __$WidgetTimetableDataCopyWithImpl<$Res> implements _$WidgetTimetableDataCopyWith<$Res> { __$WidgetTimetableDataCopyWithImpl(this._self, this._then); final _WidgetTimetableData _self; final $Res Function(_WidgetTimetableData) _then; /// Create a copy of WidgetTimetableData /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? fetchedAt = null,Object? anchorDate = null,Object? lessons = null,Object? periods = null,Object? isHoliday = null,Object? holidayName = freezed,Object? days = null,}) { return _then(_WidgetTimetableData( fetchedAt: null == fetchedAt ? _self.fetchedAt : fetchedAt // ignore: cast_nullable_to_non_nullable as DateTime,anchorDate: null == anchorDate ? _self.anchorDate : anchorDate // ignore: cast_nullable_to_non_nullable as DateTime,lessons: null == lessons ? _self._lessons : lessons // ignore: cast_nullable_to_non_nullable as List,periods: null == periods ? _self._periods : periods // ignore: cast_nullable_to_non_nullable as List,isHoliday: null == isHoliday ? _self.isHoliday : isHoliday // ignore: cast_nullable_to_non_nullable as bool,holidayName: freezed == holidayName ? _self.holidayName : holidayName // ignore: cast_nullable_to_non_nullable as String?,days: null == days ? _self._days : days // ignore: cast_nullable_to_non_nullable as List, )); } } // dart format on