forked from eatvio/eatvio_app
800 lines
27 KiB
Dart
800 lines
27 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// 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 'consultation_model.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
|
|
|
ConsultationModel _$ConsultationModelFromJson(Map<String, dynamic> json) {
|
|
return _ConsultationModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$ConsultationModel {
|
|
int get id => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'last_state')
|
|
ChosenPlanStateEnum get chosenPlanState => throw _privateConstructorUsedError;
|
|
String get planTitle => throw _privateConstructorUsedError;
|
|
String get userName => throw _privateConstructorUsedError;
|
|
String get userSlug => throw _privateConstructorUsedError;
|
|
double get consultantPayment => throw _privateConstructorUsedError;
|
|
int get duration => throw _privateConstructorUsedError;
|
|
int get currentDiaryDay => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'start_date', fromJson: parseDate)
|
|
DateTime get startDate => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'end_date', fromJson: parseDate)
|
|
DateTime get endDate => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'consultant_id')
|
|
int get consultantId => throw _privateConstructorUsedError;
|
|
List<DiaryModel> get diaries => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this ConsultationModel to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of ConsultationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$ConsultationModelCopyWith<ConsultationModel> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $ConsultationModelCopyWith<$Res> {
|
|
factory $ConsultationModelCopyWith(
|
|
ConsultationModel value, $Res Function(ConsultationModel) then) =
|
|
_$ConsultationModelCopyWithImpl<$Res, ConsultationModel>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
@JsonKey(name: 'last_state') ChosenPlanStateEnum chosenPlanState,
|
|
String planTitle,
|
|
String userName,
|
|
String userSlug,
|
|
double consultantPayment,
|
|
int duration,
|
|
int currentDiaryDay,
|
|
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
|
|
@JsonKey(name: 'end_date', fromJson: parseDate) DateTime endDate,
|
|
@JsonKey(name: 'consultant_id') int consultantId,
|
|
List<DiaryModel> diaries});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ConsultationModelCopyWithImpl<$Res, $Val extends ConsultationModel>
|
|
implements $ConsultationModelCopyWith<$Res> {
|
|
_$ConsultationModelCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of ConsultationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? chosenPlanState = null,
|
|
Object? planTitle = null,
|
|
Object? userName = null,
|
|
Object? userSlug = null,
|
|
Object? consultantPayment = null,
|
|
Object? duration = null,
|
|
Object? currentDiaryDay = null,
|
|
Object? startDate = null,
|
|
Object? endDate = null,
|
|
Object? consultantId = null,
|
|
Object? diaries = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
chosenPlanState: null == chosenPlanState
|
|
? _value.chosenPlanState
|
|
: chosenPlanState // ignore: cast_nullable_to_non_nullable
|
|
as ChosenPlanStateEnum,
|
|
planTitle: null == planTitle
|
|
? _value.planTitle
|
|
: planTitle // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
userName: null == userName
|
|
? _value.userName
|
|
: userName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
userSlug: null == userSlug
|
|
? _value.userSlug
|
|
: userSlug // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
consultantPayment: null == consultantPayment
|
|
? _value.consultantPayment
|
|
: consultantPayment // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
duration: null == duration
|
|
? _value.duration
|
|
: duration // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
currentDiaryDay: null == currentDiaryDay
|
|
? _value.currentDiaryDay
|
|
: currentDiaryDay // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
startDate: null == startDate
|
|
? _value.startDate
|
|
: startDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
endDate: null == endDate
|
|
? _value.endDate
|
|
: endDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
consultantId: null == consultantId
|
|
? _value.consultantId
|
|
: consultantId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
diaries: null == diaries
|
|
? _value.diaries
|
|
: diaries // ignore: cast_nullable_to_non_nullable
|
|
as List<DiaryModel>,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$ConsultationModelImplCopyWith<$Res>
|
|
implements $ConsultationModelCopyWith<$Res> {
|
|
factory _$$ConsultationModelImplCopyWith(_$ConsultationModelImpl value,
|
|
$Res Function(_$ConsultationModelImpl) then) =
|
|
__$$ConsultationModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
@JsonKey(name: 'last_state') ChosenPlanStateEnum chosenPlanState,
|
|
String planTitle,
|
|
String userName,
|
|
String userSlug,
|
|
double consultantPayment,
|
|
int duration,
|
|
int currentDiaryDay,
|
|
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
|
|
@JsonKey(name: 'end_date', fromJson: parseDate) DateTime endDate,
|
|
@JsonKey(name: 'consultant_id') int consultantId,
|
|
List<DiaryModel> diaries});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ConsultationModelImplCopyWithImpl<$Res>
|
|
extends _$ConsultationModelCopyWithImpl<$Res, _$ConsultationModelImpl>
|
|
implements _$$ConsultationModelImplCopyWith<$Res> {
|
|
__$$ConsultationModelImplCopyWithImpl(_$ConsultationModelImpl _value,
|
|
$Res Function(_$ConsultationModelImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of ConsultationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? chosenPlanState = null,
|
|
Object? planTitle = null,
|
|
Object? userName = null,
|
|
Object? userSlug = null,
|
|
Object? consultantPayment = null,
|
|
Object? duration = null,
|
|
Object? currentDiaryDay = null,
|
|
Object? startDate = null,
|
|
Object? endDate = null,
|
|
Object? consultantId = null,
|
|
Object? diaries = null,
|
|
}) {
|
|
return _then(_$ConsultationModelImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
chosenPlanState: null == chosenPlanState
|
|
? _value.chosenPlanState
|
|
: chosenPlanState // ignore: cast_nullable_to_non_nullable
|
|
as ChosenPlanStateEnum,
|
|
planTitle: null == planTitle
|
|
? _value.planTitle
|
|
: planTitle // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
userName: null == userName
|
|
? _value.userName
|
|
: userName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
userSlug: null == userSlug
|
|
? _value.userSlug
|
|
: userSlug // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
consultantPayment: null == consultantPayment
|
|
? _value.consultantPayment
|
|
: consultantPayment // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
duration: null == duration
|
|
? _value.duration
|
|
: duration // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
currentDiaryDay: null == currentDiaryDay
|
|
? _value.currentDiaryDay
|
|
: currentDiaryDay // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
startDate: null == startDate
|
|
? _value.startDate
|
|
: startDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
endDate: null == endDate
|
|
? _value.endDate
|
|
: endDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
consultantId: null == consultantId
|
|
? _value.consultantId
|
|
: consultantId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
diaries: null == diaries
|
|
? _value._diaries
|
|
: diaries // ignore: cast_nullable_to_non_nullable
|
|
as List<DiaryModel>,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$ConsultationModelImpl implements _ConsultationModel {
|
|
_$ConsultationModelImpl(
|
|
{required this.id,
|
|
@JsonKey(name: 'last_state') required this.chosenPlanState,
|
|
required this.planTitle,
|
|
required this.userName,
|
|
required this.userSlug,
|
|
required this.consultantPayment,
|
|
required this.duration,
|
|
required this.currentDiaryDay,
|
|
@JsonKey(name: 'start_date', fromJson: parseDate) required this.startDate,
|
|
@JsonKey(name: 'end_date', fromJson: parseDate) required this.endDate,
|
|
@JsonKey(name: 'consultant_id') required this.consultantId,
|
|
required final List<DiaryModel> diaries})
|
|
: _diaries = diaries;
|
|
|
|
factory _$ConsultationModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$ConsultationModelImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
@JsonKey(name: 'last_state')
|
|
final ChosenPlanStateEnum chosenPlanState;
|
|
@override
|
|
final String planTitle;
|
|
@override
|
|
final String userName;
|
|
@override
|
|
final String userSlug;
|
|
@override
|
|
final double consultantPayment;
|
|
@override
|
|
final int duration;
|
|
@override
|
|
final int currentDiaryDay;
|
|
@override
|
|
@JsonKey(name: 'start_date', fromJson: parseDate)
|
|
final DateTime startDate;
|
|
@override
|
|
@JsonKey(name: 'end_date', fromJson: parseDate)
|
|
final DateTime endDate;
|
|
@override
|
|
@JsonKey(name: 'consultant_id')
|
|
final int consultantId;
|
|
final List<DiaryModel> _diaries;
|
|
@override
|
|
List<DiaryModel> get diaries {
|
|
if (_diaries is EqualUnmodifiableListView) return _diaries;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_diaries);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ConsultationModel(id: $id, chosenPlanState: $chosenPlanState, planTitle: $planTitle, userName: $userName, userSlug: $userSlug, consultantPayment: $consultantPayment, duration: $duration, currentDiaryDay: $currentDiaryDay, startDate: $startDate, endDate: $endDate, consultantId: $consultantId, diaries: $diaries)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ConsultationModelImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.chosenPlanState, chosenPlanState) ||
|
|
other.chosenPlanState == chosenPlanState) &&
|
|
(identical(other.planTitle, planTitle) ||
|
|
other.planTitle == planTitle) &&
|
|
(identical(other.userName, userName) ||
|
|
other.userName == userName) &&
|
|
(identical(other.userSlug, userSlug) ||
|
|
other.userSlug == userSlug) &&
|
|
(identical(other.consultantPayment, consultantPayment) ||
|
|
other.consultantPayment == consultantPayment) &&
|
|
(identical(other.duration, duration) ||
|
|
other.duration == duration) &&
|
|
(identical(other.currentDiaryDay, currentDiaryDay) ||
|
|
other.currentDiaryDay == currentDiaryDay) &&
|
|
(identical(other.startDate, startDate) ||
|
|
other.startDate == startDate) &&
|
|
(identical(other.endDate, endDate) || other.endDate == endDate) &&
|
|
(identical(other.consultantId, consultantId) ||
|
|
other.consultantId == consultantId) &&
|
|
const DeepCollectionEquality().equals(other._diaries, _diaries));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
chosenPlanState,
|
|
planTitle,
|
|
userName,
|
|
userSlug,
|
|
consultantPayment,
|
|
duration,
|
|
currentDiaryDay,
|
|
startDate,
|
|
endDate,
|
|
consultantId,
|
|
const DeepCollectionEquality().hash(_diaries));
|
|
|
|
/// Create a copy of ConsultationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$ConsultationModelImplCopyWith<_$ConsultationModelImpl> get copyWith =>
|
|
__$$ConsultationModelImplCopyWithImpl<_$ConsultationModelImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$ConsultationModelImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _ConsultationModel implements ConsultationModel {
|
|
factory _ConsultationModel(
|
|
{required final int id,
|
|
@JsonKey(name: 'last_state')
|
|
required final ChosenPlanStateEnum chosenPlanState,
|
|
required final String planTitle,
|
|
required final String userName,
|
|
required final String userSlug,
|
|
required final double consultantPayment,
|
|
required final int duration,
|
|
required final int currentDiaryDay,
|
|
@JsonKey(name: 'start_date', fromJson: parseDate)
|
|
required final DateTime startDate,
|
|
@JsonKey(name: 'end_date', fromJson: parseDate)
|
|
required final DateTime endDate,
|
|
@JsonKey(name: 'consultant_id') required final int consultantId,
|
|
required final List<DiaryModel> diaries}) = _$ConsultationModelImpl;
|
|
|
|
factory _ConsultationModel.fromJson(Map<String, dynamic> json) =
|
|
_$ConsultationModelImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
@JsonKey(name: 'last_state')
|
|
ChosenPlanStateEnum get chosenPlanState;
|
|
@override
|
|
String get planTitle;
|
|
@override
|
|
String get userName;
|
|
@override
|
|
String get userSlug;
|
|
@override
|
|
double get consultantPayment;
|
|
@override
|
|
int get duration;
|
|
@override
|
|
int get currentDiaryDay;
|
|
@override
|
|
@JsonKey(name: 'start_date', fromJson: parseDate)
|
|
DateTime get startDate;
|
|
@override
|
|
@JsonKey(name: 'end_date', fromJson: parseDate)
|
|
DateTime get endDate;
|
|
@override
|
|
@JsonKey(name: 'consultant_id')
|
|
int get consultantId;
|
|
@override
|
|
List<DiaryModel> get diaries;
|
|
|
|
/// Create a copy of ConsultationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$ConsultationModelImplCopyWith<_$ConsultationModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
DiaryModel _$DiaryModelFromJson(Map<String, dynamic> json) {
|
|
return _DiaryModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$DiaryModel {
|
|
int get id => throw _privateConstructorUsedError;
|
|
DiaryStateEnum get state => throw _privateConstructorUsedError;
|
|
@JsonKey(fromJson: parseUnformattedDate)
|
|
DateTime get date => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this DiaryModel to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of DiaryModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$DiaryModelCopyWith<DiaryModel> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $DiaryModelCopyWith<$Res> {
|
|
factory $DiaryModelCopyWith(
|
|
DiaryModel value, $Res Function(DiaryModel) then) =
|
|
_$DiaryModelCopyWithImpl<$Res, DiaryModel>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
DiaryStateEnum state,
|
|
@JsonKey(fromJson: parseUnformattedDate) DateTime date});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
|
|
implements $DiaryModelCopyWith<$Res> {
|
|
_$DiaryModelCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of DiaryModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? state = null,
|
|
Object? date = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
state: null == state
|
|
? _value.state
|
|
: state // ignore: cast_nullable_to_non_nullable
|
|
as DiaryStateEnum,
|
|
date: null == date
|
|
? _value.date
|
|
: date // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$DiaryModelImplCopyWith<$Res>
|
|
implements $DiaryModelCopyWith<$Res> {
|
|
factory _$$DiaryModelImplCopyWith(
|
|
_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) =
|
|
__$$DiaryModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
DiaryStateEnum state,
|
|
@JsonKey(fromJson: parseUnformattedDate) DateTime date});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$DiaryModelImplCopyWithImpl<$Res>
|
|
extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl>
|
|
implements _$$DiaryModelImplCopyWith<$Res> {
|
|
__$$DiaryModelImplCopyWithImpl(
|
|
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of DiaryModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? state = null,
|
|
Object? date = null,
|
|
}) {
|
|
return _then(_$DiaryModelImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
state: null == state
|
|
? _value.state
|
|
: state // ignore: cast_nullable_to_non_nullable
|
|
as DiaryStateEnum,
|
|
date: null == date
|
|
? _value.date
|
|
: date // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$DiaryModelImpl implements _DiaryModel {
|
|
_$DiaryModelImpl(
|
|
{required this.id,
|
|
required this.state,
|
|
@JsonKey(fromJson: parseUnformattedDate) required this.date});
|
|
|
|
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$DiaryModelImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final DiaryStateEnum state;
|
|
@override
|
|
@JsonKey(fromJson: parseUnformattedDate)
|
|
final DateTime date;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'DiaryModel(id: $id, state: $state, date: $date)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$DiaryModelImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.state, state) || other.state == state) &&
|
|
(identical(other.date, date) || other.date == date));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, state, date);
|
|
|
|
/// Create a copy of DiaryModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
|
__$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$DiaryModelImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _DiaryModel implements DiaryModel {
|
|
factory _DiaryModel(
|
|
{required final int id,
|
|
required final DiaryStateEnum state,
|
|
@JsonKey(fromJson: parseUnformattedDate)
|
|
required final DateTime date}) = _$DiaryModelImpl;
|
|
|
|
factory _DiaryModel.fromJson(Map<String, dynamic> json) =
|
|
_$DiaryModelImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
DiaryStateEnum get state;
|
|
@override
|
|
@JsonKey(fromJson: parseUnformattedDate)
|
|
DateTime get date;
|
|
|
|
/// Create a copy of DiaryModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
ConsultationPaginationModel _$ConsultationPaginationModelFromJson(
|
|
Map<String, dynamic> json) {
|
|
return _ConsultationPaginationModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$ConsultationPaginationModel {
|
|
List<ConsultationModel> get data => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this ConsultationPaginationModel to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of ConsultationPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$ConsultationPaginationModelCopyWith<ConsultationPaginationModel>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $ConsultationPaginationModelCopyWith<$Res> {
|
|
factory $ConsultationPaginationModelCopyWith(
|
|
ConsultationPaginationModel value,
|
|
$Res Function(ConsultationPaginationModel) then) =
|
|
_$ConsultationPaginationModelCopyWithImpl<$Res,
|
|
ConsultationPaginationModel>;
|
|
@useResult
|
|
$Res call({List<ConsultationModel> data});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ConsultationPaginationModelCopyWithImpl<$Res,
|
|
$Val extends ConsultationPaginationModel>
|
|
implements $ConsultationPaginationModelCopyWith<$Res> {
|
|
_$ConsultationPaginationModelCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of ConsultationPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? data = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
data: null == data
|
|
? _value.data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as List<ConsultationModel>,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$ConsultationPaginationModelImplCopyWith<$Res>
|
|
implements $ConsultationPaginationModelCopyWith<$Res> {
|
|
factory _$$ConsultationPaginationModelImplCopyWith(
|
|
_$ConsultationPaginationModelImpl value,
|
|
$Res Function(_$ConsultationPaginationModelImpl) then) =
|
|
__$$ConsultationPaginationModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({List<ConsultationModel> data});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ConsultationPaginationModelImplCopyWithImpl<$Res>
|
|
extends _$ConsultationPaginationModelCopyWithImpl<$Res,
|
|
_$ConsultationPaginationModelImpl>
|
|
implements _$$ConsultationPaginationModelImplCopyWith<$Res> {
|
|
__$$ConsultationPaginationModelImplCopyWithImpl(
|
|
_$ConsultationPaginationModelImpl _value,
|
|
$Res Function(_$ConsultationPaginationModelImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of ConsultationPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? data = null,
|
|
}) {
|
|
return _then(_$ConsultationPaginationModelImpl(
|
|
data: null == data
|
|
? _value._data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as List<ConsultationModel>,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$ConsultationPaginationModelImpl
|
|
implements _ConsultationPaginationModel {
|
|
_$ConsultationPaginationModelImpl(
|
|
{required final List<ConsultationModel> data})
|
|
: _data = data;
|
|
|
|
factory _$ConsultationPaginationModelImpl.fromJson(
|
|
Map<String, dynamic> json) =>
|
|
_$$ConsultationPaginationModelImplFromJson(json);
|
|
|
|
final List<ConsultationModel> _data;
|
|
@override
|
|
List<ConsultationModel> get data {
|
|
if (_data is EqualUnmodifiableListView) return _data;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_data);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ConsultationPaginationModel(data: $data)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ConsultationPaginationModelImpl &&
|
|
const DeepCollectionEquality().equals(other._data, _data));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(runtimeType, const DeepCollectionEquality().hash(_data));
|
|
|
|
/// Create a copy of ConsultationPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$ConsultationPaginationModelImplCopyWith<_$ConsultationPaginationModelImpl>
|
|
get copyWith => __$$ConsultationPaginationModelImplCopyWithImpl<
|
|
_$ConsultationPaginationModelImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$ConsultationPaginationModelImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _ConsultationPaginationModel
|
|
implements ConsultationPaginationModel {
|
|
factory _ConsultationPaginationModel(
|
|
{required final List<ConsultationModel> data}) =
|
|
_$ConsultationPaginationModelImpl;
|
|
|
|
factory _ConsultationPaginationModel.fromJson(Map<String, dynamic> json) =
|
|
_$ConsultationPaginationModelImpl.fromJson;
|
|
|
|
@override
|
|
List<ConsultationModel> get data;
|
|
|
|
/// Create a copy of ConsultationPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$ConsultationPaginationModelImplCopyWith<_$ConsultationPaginationModelImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|