forked from eatvio/eatvio_app
1526 lines
50 KiB
Dart
1526 lines
50 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 'plan_pagination_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',
|
|
);
|
|
|
|
PlanPaginationModel _$PlanPaginationModelFromJson(Map<String, dynamic> json) {
|
|
return _PlanPaginationModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$PlanPaginationModel {
|
|
@JsonKey(name: "data")
|
|
List<PlanModel> get data => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "links")
|
|
Links get links => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "meta")
|
|
Meta get meta => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this PlanPaginationModel to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of PlanPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$PlanPaginationModelCopyWith<PlanPaginationModel> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $PlanPaginationModelCopyWith<$Res> {
|
|
factory $PlanPaginationModelCopyWith(
|
|
PlanPaginationModel value,
|
|
$Res Function(PlanPaginationModel) then,
|
|
) = _$PlanPaginationModelCopyWithImpl<$Res, PlanPaginationModel>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "data") List<PlanModel> data,
|
|
@JsonKey(name: "links") Links links,
|
|
@JsonKey(name: "meta") Meta meta,
|
|
});
|
|
|
|
$LinksCopyWith<$Res> get links;
|
|
$MetaCopyWith<$Res> get meta;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel>
|
|
implements $PlanPaginationModelCopyWith<$Res> {
|
|
_$PlanPaginationModelCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of PlanPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
data:
|
|
null == data
|
|
? _value.data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as List<PlanModel>,
|
|
links:
|
|
null == links
|
|
? _value.links
|
|
: links // ignore: cast_nullable_to_non_nullable
|
|
as Links,
|
|
meta:
|
|
null == meta
|
|
? _value.meta
|
|
: meta // ignore: cast_nullable_to_non_nullable
|
|
as Meta,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
|
|
/// Create a copy of PlanPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$LinksCopyWith<$Res> get links {
|
|
return $LinksCopyWith<$Res>(_value.links, (value) {
|
|
return _then(_value.copyWith(links: value) as $Val);
|
|
});
|
|
}
|
|
|
|
/// Create a copy of PlanPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$MetaCopyWith<$Res> get meta {
|
|
return $MetaCopyWith<$Res>(_value.meta, (value) {
|
|
return _then(_value.copyWith(meta: value) as $Val);
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$PlanPaginationModelImplCopyWith<$Res>
|
|
implements $PlanPaginationModelCopyWith<$Res> {
|
|
factory _$$PlanPaginationModelImplCopyWith(
|
|
_$PlanPaginationModelImpl value,
|
|
$Res Function(_$PlanPaginationModelImpl) then,
|
|
) = __$$PlanPaginationModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "data") List<PlanModel> data,
|
|
@JsonKey(name: "links") Links links,
|
|
@JsonKey(name: "meta") Meta meta,
|
|
});
|
|
|
|
@override
|
|
$LinksCopyWith<$Res> get links;
|
|
@override
|
|
$MetaCopyWith<$Res> get meta;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$PlanPaginationModelImplCopyWithImpl<$Res>
|
|
extends _$PlanPaginationModelCopyWithImpl<$Res, _$PlanPaginationModelImpl>
|
|
implements _$$PlanPaginationModelImplCopyWith<$Res> {
|
|
__$$PlanPaginationModelImplCopyWithImpl(
|
|
_$PlanPaginationModelImpl _value,
|
|
$Res Function(_$PlanPaginationModelImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of PlanPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
|
|
return _then(
|
|
_$PlanPaginationModelImpl(
|
|
data:
|
|
null == data
|
|
? _value._data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as List<PlanModel>,
|
|
links:
|
|
null == links
|
|
? _value.links
|
|
: links // ignore: cast_nullable_to_non_nullable
|
|
as Links,
|
|
meta:
|
|
null == meta
|
|
? _value.meta
|
|
: meta // ignore: cast_nullable_to_non_nullable
|
|
as Meta,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$PlanPaginationModelImpl implements _PlanPaginationModel {
|
|
const _$PlanPaginationModelImpl({
|
|
@JsonKey(name: "data") required final List<PlanModel> data,
|
|
@JsonKey(name: "links") required this.links,
|
|
@JsonKey(name: "meta") required this.meta,
|
|
}) : _data = data;
|
|
|
|
factory _$PlanPaginationModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$PlanPaginationModelImplFromJson(json);
|
|
|
|
final List<PlanModel> _data;
|
|
@override
|
|
@JsonKey(name: "data")
|
|
List<PlanModel> get data {
|
|
if (_data is EqualUnmodifiableListView) return _data;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_data);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(name: "links")
|
|
final Links links;
|
|
@override
|
|
@JsonKey(name: "meta")
|
|
final Meta meta;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'PlanPaginationModel(data: $data, links: $links, meta: $meta)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$PlanPaginationModelImpl &&
|
|
const DeepCollectionEquality().equals(other._data, _data) &&
|
|
(identical(other.links, links) || other.links == links) &&
|
|
(identical(other.meta, meta) || other.meta == meta));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_data),
|
|
links,
|
|
meta,
|
|
);
|
|
|
|
/// Create a copy of PlanPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith =>
|
|
__$$PlanPaginationModelImplCopyWithImpl<_$PlanPaginationModelImpl>(
|
|
this,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$PlanPaginationModelImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _PlanPaginationModel implements PlanPaginationModel {
|
|
const factory _PlanPaginationModel({
|
|
@JsonKey(name: "data") required final List<PlanModel> data,
|
|
@JsonKey(name: "links") required final Links links,
|
|
@JsonKey(name: "meta") required final Meta meta,
|
|
}) = _$PlanPaginationModelImpl;
|
|
|
|
factory _PlanPaginationModel.fromJson(Map<String, dynamic> json) =
|
|
_$PlanPaginationModelImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "data")
|
|
List<PlanModel> get data;
|
|
@override
|
|
@JsonKey(name: "links")
|
|
Links get links;
|
|
@override
|
|
@JsonKey(name: "meta")
|
|
Meta get meta;
|
|
|
|
/// Create a copy of PlanPaginationModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
PlanModel _$PlanModelFromJson(Map<String, dynamic> json) {
|
|
return _PlanModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$PlanModel {
|
|
@JsonKey(name: "id")
|
|
int get id => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "slug")
|
|
String get slug => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "name")
|
|
String get name => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "image")
|
|
String get image => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "duration")
|
|
int get duration => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "state")
|
|
String get state => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "type", fromJson: planTypeFromJson)
|
|
PlanType get type => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "description_md")
|
|
String get details => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "packets_count")
|
|
int get packetsCount => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "packet1_options")
|
|
PacketOptions? get packet1Options => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "packet2_options")
|
|
PacketOptions? get packet2Options => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "packet3_options")
|
|
PacketOptions? get packet3Options => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "author")
|
|
Author get author => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "total_likes")
|
|
int get totalLikes => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "total_views")
|
|
int get totalViews => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "total_comments")
|
|
int get totalComments => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "is_favorite")
|
|
bool get isFavorite => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "min_price_of_options")
|
|
double get minPriceOfOptions => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "max_price_of_options")
|
|
double get maxPriceOfOptions => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "was_liked_by_me")
|
|
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this PlanModel to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$PlanModelCopyWith<PlanModel> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $PlanModelCopyWith<$Res> {
|
|
factory $PlanModelCopyWith(PlanModel value, $Res Function(PlanModel) then) =
|
|
_$PlanModelCopyWithImpl<$Res, PlanModel>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "id") int id,
|
|
@JsonKey(name: "slug") String slug,
|
|
@JsonKey(name: "name") String name,
|
|
@JsonKey(name: "image") String image,
|
|
@JsonKey(name: "duration") int duration,
|
|
@JsonKey(name: "state") String state,
|
|
@JsonKey(name: "type", fromJson: planTypeFromJson) PlanType type,
|
|
@JsonKey(name: "description_md") String details,
|
|
@JsonKey(name: "packets_count") int packetsCount,
|
|
@JsonKey(name: "packet1_options") PacketOptions? packet1Options,
|
|
@JsonKey(name: "packet2_options") PacketOptions? packet2Options,
|
|
@JsonKey(name: "packet3_options") PacketOptions? packet3Options,
|
|
@JsonKey(name: "author") Author author,
|
|
@JsonKey(name: "total_likes") int totalLikes,
|
|
@JsonKey(name: "total_views") int totalViews,
|
|
@JsonKey(name: "total_comments") int totalComments,
|
|
@JsonKey(name: "is_favorite") bool isFavorite,
|
|
@JsonKey(name: "min_price_of_options") double minPriceOfOptions,
|
|
@JsonKey(name: "max_price_of_options") double maxPriceOfOptions,
|
|
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
|
|
});
|
|
|
|
$PlanTypeCopyWith<$Res> get type;
|
|
$PacketOptionsCopyWith<$Res>? get packet1Options;
|
|
$PacketOptionsCopyWith<$Res>? get packet2Options;
|
|
$PacketOptionsCopyWith<$Res>? get packet3Options;
|
|
$AuthorCopyWith<$Res> get author;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
|
|
implements $PlanModelCopyWith<$Res> {
|
|
_$PlanModelCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? slug = null,
|
|
Object? name = null,
|
|
Object? image = null,
|
|
Object? duration = null,
|
|
Object? state = null,
|
|
Object? type = null,
|
|
Object? details = null,
|
|
Object? packetsCount = null,
|
|
Object? packet1Options = freezed,
|
|
Object? packet2Options = freezed,
|
|
Object? packet3Options = freezed,
|
|
Object? author = null,
|
|
Object? totalLikes = null,
|
|
Object? totalViews = null,
|
|
Object? totalComments = null,
|
|
Object? isFavorite = null,
|
|
Object? minPriceOfOptions = null,
|
|
Object? maxPriceOfOptions = null,
|
|
Object? wasLikedByMe = null,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
id:
|
|
null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
slug:
|
|
null == slug
|
|
? _value.slug
|
|
: slug // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name:
|
|
null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
image:
|
|
null == image
|
|
? _value.image
|
|
: image // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
duration:
|
|
null == duration
|
|
? _value.duration
|
|
: duration // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
state:
|
|
null == state
|
|
? _value.state
|
|
: state // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
type:
|
|
null == type
|
|
? _value.type
|
|
: type // ignore: cast_nullable_to_non_nullable
|
|
as PlanType,
|
|
details:
|
|
null == details
|
|
? _value.details
|
|
: details // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
packetsCount:
|
|
null == packetsCount
|
|
? _value.packetsCount
|
|
: packetsCount // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
packet1Options:
|
|
freezed == packet1Options
|
|
? _value.packet1Options
|
|
: packet1Options // ignore: cast_nullable_to_non_nullable
|
|
as PacketOptions?,
|
|
packet2Options:
|
|
freezed == packet2Options
|
|
? _value.packet2Options
|
|
: packet2Options // ignore: cast_nullable_to_non_nullable
|
|
as PacketOptions?,
|
|
packet3Options:
|
|
freezed == packet3Options
|
|
? _value.packet3Options
|
|
: packet3Options // ignore: cast_nullable_to_non_nullable
|
|
as PacketOptions?,
|
|
author:
|
|
null == author
|
|
? _value.author
|
|
: author // ignore: cast_nullable_to_non_nullable
|
|
as Author,
|
|
totalLikes:
|
|
null == totalLikes
|
|
? _value.totalLikes
|
|
: totalLikes // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
totalViews:
|
|
null == totalViews
|
|
? _value.totalViews
|
|
: totalViews // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
totalComments:
|
|
null == totalComments
|
|
? _value.totalComments
|
|
: totalComments // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
isFavorite:
|
|
null == isFavorite
|
|
? _value.isFavorite
|
|
: isFavorite // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
minPriceOfOptions:
|
|
null == minPriceOfOptions
|
|
? _value.minPriceOfOptions
|
|
: minPriceOfOptions // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
maxPriceOfOptions:
|
|
null == maxPriceOfOptions
|
|
? _value.maxPriceOfOptions
|
|
: maxPriceOfOptions // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
wasLikedByMe:
|
|
null == wasLikedByMe
|
|
? _value.wasLikedByMe
|
|
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$PlanTypeCopyWith<$Res> get type {
|
|
return $PlanTypeCopyWith<$Res>(_value.type, (value) {
|
|
return _then(_value.copyWith(type: value) as $Val);
|
|
});
|
|
}
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$PacketOptionsCopyWith<$Res>? get packet1Options {
|
|
if (_value.packet1Options == null) {
|
|
return null;
|
|
}
|
|
|
|
return $PacketOptionsCopyWith<$Res>(_value.packet1Options!, (value) {
|
|
return _then(_value.copyWith(packet1Options: value) as $Val);
|
|
});
|
|
}
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$PacketOptionsCopyWith<$Res>? get packet2Options {
|
|
if (_value.packet2Options == null) {
|
|
return null;
|
|
}
|
|
|
|
return $PacketOptionsCopyWith<$Res>(_value.packet2Options!, (value) {
|
|
return _then(_value.copyWith(packet2Options: value) as $Val);
|
|
});
|
|
}
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$PacketOptionsCopyWith<$Res>? get packet3Options {
|
|
if (_value.packet3Options == null) {
|
|
return null;
|
|
}
|
|
|
|
return $PacketOptionsCopyWith<$Res>(_value.packet3Options!, (value) {
|
|
return _then(_value.copyWith(packet3Options: value) as $Val);
|
|
});
|
|
}
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$AuthorCopyWith<$Res> get author {
|
|
return $AuthorCopyWith<$Res>(_value.author, (value) {
|
|
return _then(_value.copyWith(author: value) as $Val);
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$PlanModelImplCopyWith<$Res>
|
|
implements $PlanModelCopyWith<$Res> {
|
|
factory _$$PlanModelImplCopyWith(
|
|
_$PlanModelImpl value,
|
|
$Res Function(_$PlanModelImpl) then,
|
|
) = __$$PlanModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "id") int id,
|
|
@JsonKey(name: "slug") String slug,
|
|
@JsonKey(name: "name") String name,
|
|
@JsonKey(name: "image") String image,
|
|
@JsonKey(name: "duration") int duration,
|
|
@JsonKey(name: "state") String state,
|
|
@JsonKey(name: "type", fromJson: planTypeFromJson) PlanType type,
|
|
@JsonKey(name: "description_md") String details,
|
|
@JsonKey(name: "packets_count") int packetsCount,
|
|
@JsonKey(name: "packet1_options") PacketOptions? packet1Options,
|
|
@JsonKey(name: "packet2_options") PacketOptions? packet2Options,
|
|
@JsonKey(name: "packet3_options") PacketOptions? packet3Options,
|
|
@JsonKey(name: "author") Author author,
|
|
@JsonKey(name: "total_likes") int totalLikes,
|
|
@JsonKey(name: "total_views") int totalViews,
|
|
@JsonKey(name: "total_comments") int totalComments,
|
|
@JsonKey(name: "is_favorite") bool isFavorite,
|
|
@JsonKey(name: "min_price_of_options") double minPriceOfOptions,
|
|
@JsonKey(name: "max_price_of_options") double maxPriceOfOptions,
|
|
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
|
|
});
|
|
|
|
@override
|
|
$PlanTypeCopyWith<$Res> get type;
|
|
@override
|
|
$PacketOptionsCopyWith<$Res>? get packet1Options;
|
|
@override
|
|
$PacketOptionsCopyWith<$Res>? get packet2Options;
|
|
@override
|
|
$PacketOptionsCopyWith<$Res>? get packet3Options;
|
|
@override
|
|
$AuthorCopyWith<$Res> get author;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$PlanModelImplCopyWithImpl<$Res>
|
|
extends _$PlanModelCopyWithImpl<$Res, _$PlanModelImpl>
|
|
implements _$$PlanModelImplCopyWith<$Res> {
|
|
__$$PlanModelImplCopyWithImpl(
|
|
_$PlanModelImpl _value,
|
|
$Res Function(_$PlanModelImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? slug = null,
|
|
Object? name = null,
|
|
Object? image = null,
|
|
Object? duration = null,
|
|
Object? state = null,
|
|
Object? type = null,
|
|
Object? details = null,
|
|
Object? packetsCount = null,
|
|
Object? packet1Options = freezed,
|
|
Object? packet2Options = freezed,
|
|
Object? packet3Options = freezed,
|
|
Object? author = null,
|
|
Object? totalLikes = null,
|
|
Object? totalViews = null,
|
|
Object? totalComments = null,
|
|
Object? isFavorite = null,
|
|
Object? minPriceOfOptions = null,
|
|
Object? maxPriceOfOptions = null,
|
|
Object? wasLikedByMe = null,
|
|
}) {
|
|
return _then(
|
|
_$PlanModelImpl(
|
|
id:
|
|
null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
slug:
|
|
null == slug
|
|
? _value.slug
|
|
: slug // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name:
|
|
null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
image:
|
|
null == image
|
|
? _value.image
|
|
: image // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
duration:
|
|
null == duration
|
|
? _value.duration
|
|
: duration // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
state:
|
|
null == state
|
|
? _value.state
|
|
: state // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
type:
|
|
null == type
|
|
? _value.type
|
|
: type // ignore: cast_nullable_to_non_nullable
|
|
as PlanType,
|
|
details:
|
|
null == details
|
|
? _value.details
|
|
: details // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
packetsCount:
|
|
null == packetsCount
|
|
? _value.packetsCount
|
|
: packetsCount // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
packet1Options:
|
|
freezed == packet1Options
|
|
? _value.packet1Options
|
|
: packet1Options // ignore: cast_nullable_to_non_nullable
|
|
as PacketOptions?,
|
|
packet2Options:
|
|
freezed == packet2Options
|
|
? _value.packet2Options
|
|
: packet2Options // ignore: cast_nullable_to_non_nullable
|
|
as PacketOptions?,
|
|
packet3Options:
|
|
freezed == packet3Options
|
|
? _value.packet3Options
|
|
: packet3Options // ignore: cast_nullable_to_non_nullable
|
|
as PacketOptions?,
|
|
author:
|
|
null == author
|
|
? _value.author
|
|
: author // ignore: cast_nullable_to_non_nullable
|
|
as Author,
|
|
totalLikes:
|
|
null == totalLikes
|
|
? _value.totalLikes
|
|
: totalLikes // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
totalViews:
|
|
null == totalViews
|
|
? _value.totalViews
|
|
: totalViews // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
totalComments:
|
|
null == totalComments
|
|
? _value.totalComments
|
|
: totalComments // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
isFavorite:
|
|
null == isFavorite
|
|
? _value.isFavorite
|
|
: isFavorite // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
minPriceOfOptions:
|
|
null == minPriceOfOptions
|
|
? _value.minPriceOfOptions
|
|
: minPriceOfOptions // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
maxPriceOfOptions:
|
|
null == maxPriceOfOptions
|
|
? _value.maxPriceOfOptions
|
|
: maxPriceOfOptions // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
wasLikedByMe:
|
|
null == wasLikedByMe
|
|
? _value.wasLikedByMe
|
|
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$PlanModelImpl implements _PlanModel {
|
|
const _$PlanModelImpl({
|
|
@JsonKey(name: "id") required this.id,
|
|
@JsonKey(name: "slug") required this.slug,
|
|
@JsonKey(name: "name") required this.name,
|
|
@JsonKey(name: "image") required this.image,
|
|
@JsonKey(name: "duration") required this.duration,
|
|
@JsonKey(name: "state") required this.state,
|
|
@JsonKey(name: "type", fromJson: planTypeFromJson) required this.type,
|
|
@JsonKey(name: "description_md") required this.details,
|
|
@JsonKey(name: "packets_count") required this.packetsCount,
|
|
@JsonKey(name: "packet1_options") this.packet1Options,
|
|
@JsonKey(name: "packet2_options") this.packet2Options,
|
|
@JsonKey(name: "packet3_options") this.packet3Options,
|
|
@JsonKey(name: "author") required this.author,
|
|
@JsonKey(name: "total_likes") required this.totalLikes,
|
|
@JsonKey(name: "total_views") required this.totalViews,
|
|
@JsonKey(name: "total_comments") required this.totalComments,
|
|
@JsonKey(name: "is_favorite") required this.isFavorite,
|
|
@JsonKey(name: "min_price_of_options") required this.minPriceOfOptions,
|
|
@JsonKey(name: "max_price_of_options") required this.maxPriceOfOptions,
|
|
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe,
|
|
});
|
|
|
|
factory _$PlanModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$PlanModelImplFromJson(json);
|
|
|
|
@override
|
|
@JsonKey(name: "id")
|
|
final int id;
|
|
@override
|
|
@JsonKey(name: "slug")
|
|
final String slug;
|
|
@override
|
|
@JsonKey(name: "name")
|
|
final String name;
|
|
@override
|
|
@JsonKey(name: "image")
|
|
final String image;
|
|
@override
|
|
@JsonKey(name: "duration")
|
|
final int duration;
|
|
@override
|
|
@JsonKey(name: "state")
|
|
final String state;
|
|
@override
|
|
@JsonKey(name: "type", fromJson: planTypeFromJson)
|
|
final PlanType type;
|
|
@override
|
|
@JsonKey(name: "description_md")
|
|
final String details;
|
|
@override
|
|
@JsonKey(name: "packets_count")
|
|
final int packetsCount;
|
|
@override
|
|
@JsonKey(name: "packet1_options")
|
|
final PacketOptions? packet1Options;
|
|
@override
|
|
@JsonKey(name: "packet2_options")
|
|
final PacketOptions? packet2Options;
|
|
@override
|
|
@JsonKey(name: "packet3_options")
|
|
final PacketOptions? packet3Options;
|
|
@override
|
|
@JsonKey(name: "author")
|
|
final Author author;
|
|
@override
|
|
@JsonKey(name: "total_likes")
|
|
final int totalLikes;
|
|
@override
|
|
@JsonKey(name: "total_views")
|
|
final int totalViews;
|
|
@override
|
|
@JsonKey(name: "total_comments")
|
|
final int totalComments;
|
|
@override
|
|
@JsonKey(name: "is_favorite")
|
|
final bool isFavorite;
|
|
@override
|
|
@JsonKey(name: "min_price_of_options")
|
|
final double minPriceOfOptions;
|
|
@override
|
|
@JsonKey(name: "max_price_of_options")
|
|
final double maxPriceOfOptions;
|
|
@override
|
|
@JsonKey(name: "was_liked_by_me")
|
|
final bool wasLikedByMe;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'PlanModel(id: $id, slug: $slug, name: $name, image: $image, duration: $duration, state: $state, type: $type, details: $details, packetsCount: $packetsCount, packet1Options: $packet1Options, packet2Options: $packet2Options, packet3Options: $packet3Options, author: $author, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments, isFavorite: $isFavorite, minPriceOfOptions: $minPriceOfOptions, maxPriceOfOptions: $maxPriceOfOptions, wasLikedByMe: $wasLikedByMe)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$PlanModelImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.slug, slug) || other.slug == slug) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.image, image) || other.image == image) &&
|
|
(identical(other.duration, duration) ||
|
|
other.duration == duration) &&
|
|
(identical(other.state, state) || other.state == state) &&
|
|
(identical(other.type, type) || other.type == type) &&
|
|
(identical(other.details, details) || other.details == details) &&
|
|
(identical(other.packetsCount, packetsCount) ||
|
|
other.packetsCount == packetsCount) &&
|
|
(identical(other.packet1Options, packet1Options) ||
|
|
other.packet1Options == packet1Options) &&
|
|
(identical(other.packet2Options, packet2Options) ||
|
|
other.packet2Options == packet2Options) &&
|
|
(identical(other.packet3Options, packet3Options) ||
|
|
other.packet3Options == packet3Options) &&
|
|
(identical(other.author, author) || other.author == author) &&
|
|
(identical(other.totalLikes, totalLikes) ||
|
|
other.totalLikes == totalLikes) &&
|
|
(identical(other.totalViews, totalViews) ||
|
|
other.totalViews == totalViews) &&
|
|
(identical(other.totalComments, totalComments) ||
|
|
other.totalComments == totalComments) &&
|
|
(identical(other.isFavorite, isFavorite) ||
|
|
other.isFavorite == isFavorite) &&
|
|
(identical(other.minPriceOfOptions, minPriceOfOptions) ||
|
|
other.minPriceOfOptions == minPriceOfOptions) &&
|
|
(identical(other.maxPriceOfOptions, maxPriceOfOptions) ||
|
|
other.maxPriceOfOptions == maxPriceOfOptions) &&
|
|
(identical(other.wasLikedByMe, wasLikedByMe) ||
|
|
other.wasLikedByMe == wasLikedByMe));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hashAll([
|
|
runtimeType,
|
|
id,
|
|
slug,
|
|
name,
|
|
image,
|
|
duration,
|
|
state,
|
|
type,
|
|
details,
|
|
packetsCount,
|
|
packet1Options,
|
|
packet2Options,
|
|
packet3Options,
|
|
author,
|
|
totalLikes,
|
|
totalViews,
|
|
totalComments,
|
|
isFavorite,
|
|
minPriceOfOptions,
|
|
maxPriceOfOptions,
|
|
wasLikedByMe,
|
|
]);
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith =>
|
|
__$$PlanModelImplCopyWithImpl<_$PlanModelImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$PlanModelImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _PlanModel implements PlanModel {
|
|
const factory _PlanModel({
|
|
@JsonKey(name: "id") required final int id,
|
|
@JsonKey(name: "slug") required final String slug,
|
|
@JsonKey(name: "name") required final String name,
|
|
@JsonKey(name: "image") required final String image,
|
|
@JsonKey(name: "duration") required final int duration,
|
|
@JsonKey(name: "state") required final String state,
|
|
@JsonKey(name: "type", fromJson: planTypeFromJson)
|
|
required final PlanType type,
|
|
@JsonKey(name: "description_md") required final String details,
|
|
@JsonKey(name: "packets_count") required final int packetsCount,
|
|
@JsonKey(name: "packet1_options") final PacketOptions? packet1Options,
|
|
@JsonKey(name: "packet2_options") final PacketOptions? packet2Options,
|
|
@JsonKey(name: "packet3_options") final PacketOptions? packet3Options,
|
|
@JsonKey(name: "author") required final Author author,
|
|
@JsonKey(name: "total_likes") required final int totalLikes,
|
|
@JsonKey(name: "total_views") required final int totalViews,
|
|
@JsonKey(name: "total_comments") required final int totalComments,
|
|
@JsonKey(name: "is_favorite") required final bool isFavorite,
|
|
@JsonKey(name: "min_price_of_options")
|
|
required final double minPriceOfOptions,
|
|
@JsonKey(name: "max_price_of_options")
|
|
required final double maxPriceOfOptions,
|
|
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe,
|
|
}) = _$PlanModelImpl;
|
|
|
|
factory _PlanModel.fromJson(Map<String, dynamic> json) =
|
|
_$PlanModelImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "id")
|
|
int get id;
|
|
@override
|
|
@JsonKey(name: "slug")
|
|
String get slug;
|
|
@override
|
|
@JsonKey(name: "name")
|
|
String get name;
|
|
@override
|
|
@JsonKey(name: "image")
|
|
String get image;
|
|
@override
|
|
@JsonKey(name: "duration")
|
|
int get duration;
|
|
@override
|
|
@JsonKey(name: "state")
|
|
String get state;
|
|
@override
|
|
@JsonKey(name: "type", fromJson: planTypeFromJson)
|
|
PlanType get type;
|
|
@override
|
|
@JsonKey(name: "description_md")
|
|
String get details;
|
|
@override
|
|
@JsonKey(name: "packets_count")
|
|
int get packetsCount;
|
|
@override
|
|
@JsonKey(name: "packet1_options")
|
|
PacketOptions? get packet1Options;
|
|
@override
|
|
@JsonKey(name: "packet2_options")
|
|
PacketOptions? get packet2Options;
|
|
@override
|
|
@JsonKey(name: "packet3_options")
|
|
PacketOptions? get packet3Options;
|
|
@override
|
|
@JsonKey(name: "author")
|
|
Author get author;
|
|
@override
|
|
@JsonKey(name: "total_likes")
|
|
int get totalLikes;
|
|
@override
|
|
@JsonKey(name: "total_views")
|
|
int get totalViews;
|
|
@override
|
|
@JsonKey(name: "total_comments")
|
|
int get totalComments;
|
|
@override
|
|
@JsonKey(name: "is_favorite")
|
|
bool get isFavorite;
|
|
@override
|
|
@JsonKey(name: "min_price_of_options")
|
|
double get minPriceOfOptions;
|
|
@override
|
|
@JsonKey(name: "max_price_of_options")
|
|
double get maxPriceOfOptions;
|
|
@override
|
|
@JsonKey(name: "was_liked_by_me")
|
|
bool get wasLikedByMe;
|
|
|
|
/// Create a copy of PlanModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
PacketOptions _$PacketOptionsFromJson(Map<String, dynamic> json) {
|
|
return _PacketOptions.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$PacketOptions {
|
|
@JsonKey(name: "items")
|
|
List<String> get items => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "price")
|
|
dynamic get price => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "short")
|
|
String get short => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "description_md")
|
|
String get description => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this PacketOptions to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of PacketOptions
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$PacketOptionsCopyWith<PacketOptions> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $PacketOptionsCopyWith<$Res> {
|
|
factory $PacketOptionsCopyWith(
|
|
PacketOptions value,
|
|
$Res Function(PacketOptions) then,
|
|
) = _$PacketOptionsCopyWithImpl<$Res, PacketOptions>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "items") List<String> items,
|
|
@JsonKey(name: "price") dynamic price,
|
|
@JsonKey(name: "short") String short,
|
|
@JsonKey(name: "description_md") String description,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions>
|
|
implements $PacketOptionsCopyWith<$Res> {
|
|
_$PacketOptionsCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of PacketOptions
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? items = null,
|
|
Object? price = freezed,
|
|
Object? short = null,
|
|
Object? description = null,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
items:
|
|
null == items
|
|
? _value.items
|
|
: items // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
price:
|
|
freezed == price
|
|
? _value.price
|
|
: price // ignore: cast_nullable_to_non_nullable
|
|
as dynamic,
|
|
short:
|
|
null == short
|
|
? _value.short
|
|
: short // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description:
|
|
null == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$PacketOptionsImplCopyWith<$Res>
|
|
implements $PacketOptionsCopyWith<$Res> {
|
|
factory _$$PacketOptionsImplCopyWith(
|
|
_$PacketOptionsImpl value,
|
|
$Res Function(_$PacketOptionsImpl) then,
|
|
) = __$$PacketOptionsImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "items") List<String> items,
|
|
@JsonKey(name: "price") dynamic price,
|
|
@JsonKey(name: "short") String short,
|
|
@JsonKey(name: "description_md") String description,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$PacketOptionsImplCopyWithImpl<$Res>
|
|
extends _$PacketOptionsCopyWithImpl<$Res, _$PacketOptionsImpl>
|
|
implements _$$PacketOptionsImplCopyWith<$Res> {
|
|
__$$PacketOptionsImplCopyWithImpl(
|
|
_$PacketOptionsImpl _value,
|
|
$Res Function(_$PacketOptionsImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of PacketOptions
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? items = null,
|
|
Object? price = freezed,
|
|
Object? short = null,
|
|
Object? description = null,
|
|
}) {
|
|
return _then(
|
|
_$PacketOptionsImpl(
|
|
items:
|
|
null == items
|
|
? _value._items
|
|
: items // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
price:
|
|
freezed == price
|
|
? _value.price
|
|
: price // ignore: cast_nullable_to_non_nullable
|
|
as dynamic,
|
|
short:
|
|
null == short
|
|
? _value.short
|
|
: short // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description:
|
|
null == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$PacketOptionsImpl implements _PacketOptions {
|
|
const _$PacketOptionsImpl({
|
|
@JsonKey(name: "items") required final List<String> items,
|
|
@JsonKey(name: "price") required this.price,
|
|
@JsonKey(name: "short") required this.short,
|
|
@JsonKey(name: "description_md") required this.description,
|
|
}) : _items = items;
|
|
|
|
factory _$PacketOptionsImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$PacketOptionsImplFromJson(json);
|
|
|
|
final List<String> _items;
|
|
@override
|
|
@JsonKey(name: "items")
|
|
List<String> get items {
|
|
if (_items is EqualUnmodifiableListView) return _items;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_items);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(name: "price")
|
|
final dynamic price;
|
|
@override
|
|
@JsonKey(name: "short")
|
|
final String short;
|
|
@override
|
|
@JsonKey(name: "description_md")
|
|
final String description;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'PacketOptions(items: $items, price: $price, short: $short, description: $description)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$PacketOptionsImpl &&
|
|
const DeepCollectionEquality().equals(other._items, _items) &&
|
|
const DeepCollectionEquality().equals(other.price, price) &&
|
|
(identical(other.short, short) || other.short == short) &&
|
|
(identical(other.description, description) ||
|
|
other.description == description));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_items),
|
|
const DeepCollectionEquality().hash(price),
|
|
short,
|
|
description,
|
|
);
|
|
|
|
/// Create a copy of PacketOptions
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith =>
|
|
__$$PacketOptionsImplCopyWithImpl<_$PacketOptionsImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$PacketOptionsImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _PacketOptions implements PacketOptions {
|
|
const factory _PacketOptions({
|
|
@JsonKey(name: "items") required final List<String> items,
|
|
@JsonKey(name: "price") required final dynamic price,
|
|
@JsonKey(name: "short") required final String short,
|
|
@JsonKey(name: "description_md") required final String description,
|
|
}) = _$PacketOptionsImpl;
|
|
|
|
factory _PacketOptions.fromJson(Map<String, dynamic> json) =
|
|
_$PacketOptionsImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "items")
|
|
List<String> get items;
|
|
@override
|
|
@JsonKey(name: "price")
|
|
dynamic get price;
|
|
@override
|
|
@JsonKey(name: "short")
|
|
String get short;
|
|
@override
|
|
@JsonKey(name: "description_md")
|
|
String get description;
|
|
|
|
/// Create a copy of PacketOptions
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
PlanType _$PlanTypeFromJson(Map<String, dynamic> json) {
|
|
return _PlanType.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$PlanType {
|
|
@JsonKey(name: "fit")
|
|
bool? get fit => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "slim")
|
|
bool? get slim => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "behavior")
|
|
bool? get behavior => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "wellness")
|
|
bool? get wellness => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this PlanType to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of PlanType
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$PlanTypeCopyWith<PlanType> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $PlanTypeCopyWith<$Res> {
|
|
factory $PlanTypeCopyWith(PlanType value, $Res Function(PlanType) then) =
|
|
_$PlanTypeCopyWithImpl<$Res, PlanType>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "fit") bool? fit,
|
|
@JsonKey(name: "slim") bool? slim,
|
|
@JsonKey(name: "behavior") bool? behavior,
|
|
@JsonKey(name: "wellness") bool? wellness,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType>
|
|
implements $PlanTypeCopyWith<$Res> {
|
|
_$PlanTypeCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of PlanType
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? fit = freezed,
|
|
Object? slim = freezed,
|
|
Object? behavior = freezed,
|
|
Object? wellness = freezed,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
fit:
|
|
freezed == fit
|
|
? _value.fit
|
|
: fit // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
slim:
|
|
freezed == slim
|
|
? _value.slim
|
|
: slim // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
behavior:
|
|
freezed == behavior
|
|
? _value.behavior
|
|
: behavior // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
wellness:
|
|
freezed == wellness
|
|
? _value.wellness
|
|
: wellness // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$PlanTypeImplCopyWith<$Res>
|
|
implements $PlanTypeCopyWith<$Res> {
|
|
factory _$$PlanTypeImplCopyWith(
|
|
_$PlanTypeImpl value,
|
|
$Res Function(_$PlanTypeImpl) then,
|
|
) = __$$PlanTypeImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "fit") bool? fit,
|
|
@JsonKey(name: "slim") bool? slim,
|
|
@JsonKey(name: "behavior") bool? behavior,
|
|
@JsonKey(name: "wellness") bool? wellness,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$PlanTypeImplCopyWithImpl<$Res>
|
|
extends _$PlanTypeCopyWithImpl<$Res, _$PlanTypeImpl>
|
|
implements _$$PlanTypeImplCopyWith<$Res> {
|
|
__$$PlanTypeImplCopyWithImpl(
|
|
_$PlanTypeImpl _value,
|
|
$Res Function(_$PlanTypeImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of PlanType
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? fit = freezed,
|
|
Object? slim = freezed,
|
|
Object? behavior = freezed,
|
|
Object? wellness = freezed,
|
|
}) {
|
|
return _then(
|
|
_$PlanTypeImpl(
|
|
fit:
|
|
freezed == fit
|
|
? _value.fit
|
|
: fit // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
slim:
|
|
freezed == slim
|
|
? _value.slim
|
|
: slim // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
behavior:
|
|
freezed == behavior
|
|
? _value.behavior
|
|
: behavior // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
wellness:
|
|
freezed == wellness
|
|
? _value.wellness
|
|
: wellness // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$PlanTypeImpl extends _PlanType {
|
|
const _$PlanTypeImpl({
|
|
@JsonKey(name: "fit") required this.fit,
|
|
@JsonKey(name: "slim") required this.slim,
|
|
@JsonKey(name: "behavior") required this.behavior,
|
|
@JsonKey(name: "wellness") required this.wellness,
|
|
}) : super._();
|
|
|
|
factory _$PlanTypeImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$PlanTypeImplFromJson(json);
|
|
|
|
@override
|
|
@JsonKey(name: "fit")
|
|
final bool? fit;
|
|
@override
|
|
@JsonKey(name: "slim")
|
|
final bool? slim;
|
|
@override
|
|
@JsonKey(name: "behavior")
|
|
final bool? behavior;
|
|
@override
|
|
@JsonKey(name: "wellness")
|
|
final bool? wellness;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'PlanType(fit: $fit, slim: $slim, behavior: $behavior, wellness: $wellness)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$PlanTypeImpl &&
|
|
(identical(other.fit, fit) || other.fit == fit) &&
|
|
(identical(other.slim, slim) || other.slim == slim) &&
|
|
(identical(other.behavior, behavior) ||
|
|
other.behavior == behavior) &&
|
|
(identical(other.wellness, wellness) ||
|
|
other.wellness == wellness));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, fit, slim, behavior, wellness);
|
|
|
|
/// Create a copy of PlanType
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith =>
|
|
__$$PlanTypeImplCopyWithImpl<_$PlanTypeImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$PlanTypeImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _PlanType extends PlanType {
|
|
const factory _PlanType({
|
|
@JsonKey(name: "fit") required final bool? fit,
|
|
@JsonKey(name: "slim") required final bool? slim,
|
|
@JsonKey(name: "behavior") required final bool? behavior,
|
|
@JsonKey(name: "wellness") required final bool? wellness,
|
|
}) = _$PlanTypeImpl;
|
|
const _PlanType._() : super._();
|
|
|
|
factory _PlanType.fromJson(Map<String, dynamic> json) =
|
|
_$PlanTypeImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "fit")
|
|
bool? get fit;
|
|
@override
|
|
@JsonKey(name: "slim")
|
|
bool? get slim;
|
|
@override
|
|
@JsonKey(name: "behavior")
|
|
bool? get behavior;
|
|
@override
|
|
@JsonKey(name: "wellness")
|
|
bool? get wellness;
|
|
|
|
/// Create a copy of PlanType
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|