295 lines
9.6 KiB
Dart
295 lines
9.6 KiB
Dart
// 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 'guardian_child.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$GuardianChild {
|
|
|
|
String get id; String get firstName; String get lastName; String get className;
|
|
/// Create a copy of GuardianChild
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$GuardianChildCopyWith<GuardianChild> get copyWith => _$GuardianChildCopyWithImpl<GuardianChild>(this as GuardianChild, _$identity);
|
|
|
|
/// Serializes this GuardianChild to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as GuardianChild;
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is GuardianChild&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.firstName, _this.firstName) || other.firstName == _this.firstName)&&(identical(other.lastName, _this.lastName) || other.lastName == _this.lastName)&&(identical(other.className, _this.className) || other.className == _this.className));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as GuardianChild;
|
|
return Object.hash(runtimeType,_this.id,_this.firstName,_this.lastName,_this.className);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as GuardianChild;
|
|
return 'GuardianChild(id: ${_this.id}, firstName: ${_this.firstName}, lastName: ${_this.lastName}, className: ${_this.className})';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $GuardianChildCopyWith<$Res> {
|
|
factory $GuardianChildCopyWith(GuardianChild value, $Res Function(GuardianChild) _then) = _$GuardianChildCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
String id, String firstName, String lastName, String className
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$GuardianChildCopyWithImpl<$Res>
|
|
implements $GuardianChildCopyWith<$Res> {
|
|
_$GuardianChildCopyWithImpl(this._self, this._then);
|
|
|
|
final GuardianChild _self;
|
|
final $Res Function(GuardianChild) _then;
|
|
|
|
/// Create a copy of GuardianChild
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? firstName = null,Object? lastName = null,Object? className = null,}) {
|
|
return _then(GuardianChild(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
|
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
|
as String,className: null == className ? _self.className : className // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [GuardianChild].
|
|
extension GuardianChildPatterns on GuardianChild {
|
|
/// 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 extends Object?>(TResult Function( _GuardianChild value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _GuardianChild() 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 extends Object?>(TResult Function( _GuardianChild value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _GuardianChild():
|
|
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 extends Object?>(TResult? Function( _GuardianChild value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _GuardianChild() 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 extends Object?>(TResult Function( String id, String firstName, String lastName, String className)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _GuardianChild() when $default != null:
|
|
return $default(_that.id,_that.firstName,_that.lastName,_that.className);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 extends Object?>(TResult Function( String id, String firstName, String lastName, String className) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _GuardianChild():
|
|
return $default(_that.id,_that.firstName,_that.lastName,_that.className);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 extends Object?>(TResult? Function( String id, String firstName, String lastName, String className)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _GuardianChild() when $default != null:
|
|
return $default(_that.id,_that.firstName,_that.lastName,_that.className);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _GuardianChild extends GuardianChild {
|
|
const _GuardianChild({required this.id, required this.firstName, required this.lastName, this.className = ''}): super._();
|
|
factory _GuardianChild.fromJson(Map<String, dynamic> json) => _$GuardianChildFromJson(json);
|
|
|
|
@override final String id;
|
|
@override final String firstName;
|
|
@override final String lastName;
|
|
@override@JsonKey() final String className;
|
|
|
|
/// Create a copy of GuardianChild
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$GuardianChildCopyWith<_GuardianChild> get copyWith => __$GuardianChildCopyWithImpl<_GuardianChild>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$GuardianChildToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GuardianChild&&(identical(other.id, id) || other.id == id)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.className, className) || other.className == className));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType,id,firstName,lastName,className);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'GuardianChild(id: $id, firstName: $firstName, lastName: $lastName, className: $className)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$GuardianChildCopyWith<$Res> implements $GuardianChildCopyWith<$Res> {
|
|
factory _$GuardianChildCopyWith(_GuardianChild value, $Res Function(_GuardianChild) _then) = __$GuardianChildCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
String id, String firstName, String lastName, String className
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$GuardianChildCopyWithImpl<$Res>
|
|
implements _$GuardianChildCopyWith<$Res> {
|
|
__$GuardianChildCopyWithImpl(this._self, this._then);
|
|
|
|
final _GuardianChild _self;
|
|
final $Res Function(_GuardianChild) _then;
|
|
|
|
/// Create a copy of GuardianChild
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? firstName = null,Object? lastName = null,Object? className = null,}) {
|
|
return _then(_GuardianChild(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
|
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
|
as String,className: null == className ? _self.className : className // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|