diet creation scrren is done

This commit is contained in:
Username1548
2024-12-11 19:15:25 +07:00
parent 2e0a8c559f
commit 2f168a2f35
63 changed files with 3113 additions and 633 deletions

View File

@@ -262,6 +262,8 @@ PlanModel _$PlanModelFromJson(Map<String, dynamic> json) {
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")
@@ -277,11 +279,11 @@ mixin _$PlanModel {
@JsonKey(name: "packets_count")
int get packetsCount => throw _privateConstructorUsedError;
@JsonKey(name: "packet1_options")
dynamic get packet1Options => throw _privateConstructorUsedError;
PacketOptions? get packet1Options => throw _privateConstructorUsedError;
@JsonKey(name: "packet2_options")
dynamic get packet2Options => throw _privateConstructorUsedError;
PacketOptions? get packet2Options => throw _privateConstructorUsedError;
@JsonKey(name: "packet3_options")
dynamic get packet3Options => throw _privateConstructorUsedError;
PacketOptions? get packet3Options => throw _privateConstructorUsedError;
@JsonKey(name: "author")
Author get author => throw _privateConstructorUsedError;
@JsonKey(name: "total_likes")
@@ -290,6 +292,8 @@ mixin _$PlanModel {
int get totalViews => throw _privateConstructorUsedError;
@JsonKey(name: "total_comments")
int get totalComments => throw _privateConstructorUsedError;
@JsonKey(name: "is_favorite")
bool get isFavorite => throw _privateConstructorUsedError;
/// Serializes this PlanModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@@ -308,6 +312,7 @@ abstract class $PlanModelCopyWith<$Res> {
@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,
@@ -315,15 +320,19 @@ abstract class $PlanModelCopyWith<$Res> {
@JsonKey(name: "type") PlanType type,
@JsonKey(name: "details") String details,
@JsonKey(name: "packets_count") int packetsCount,
@JsonKey(name: "packet1_options") dynamic packet1Options,
@JsonKey(name: "packet2_options") dynamic packet2Options,
@JsonKey(name: "packet3_options") dynamic packet3Options,
@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: "total_comments") int totalComments,
@JsonKey(name: "is_favorite") bool isFavorite});
$PlanTypeCopyWith<$Res> get type;
$PacketOptionsCopyWith<$Res>? get packet1Options;
$PacketOptionsCopyWith<$Res>? get packet2Options;
$PacketOptionsCopyWith<$Res>? get packet3Options;
$AuthorCopyWith<$Res> get author;
}
@@ -343,6 +352,7 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
@override
$Res call({
Object? id = null,
Object? slug = null,
Object? name = null,
Object? image = null,
Object? duration = null,
@@ -357,12 +367,17 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
Object? totalLikes = null,
Object? totalViews = null,
Object? totalComments = null,
Object? isFavorite = 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
@@ -394,15 +409,15 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
packet1Options: freezed == packet1Options
? _value.packet1Options
: packet1Options // ignore: cast_nullable_to_non_nullable
as dynamic,
as PacketOptions?,
packet2Options: freezed == packet2Options
? _value.packet2Options
: packet2Options // ignore: cast_nullable_to_non_nullable
as dynamic,
as PacketOptions?,
packet3Options: freezed == packet3Options
? _value.packet3Options
: packet3Options // ignore: cast_nullable_to_non_nullable
as dynamic,
as PacketOptions?,
author: null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
@@ -419,6 +434,10 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
? _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,
) as $Val);
}
@@ -432,6 +451,48 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
});
}
/// 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
@@ -453,6 +514,7 @@ abstract class _$$PlanModelImplCopyWith<$Res>
@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,
@@ -460,17 +522,24 @@ abstract class _$$PlanModelImplCopyWith<$Res>
@JsonKey(name: "type") PlanType type,
@JsonKey(name: "details") String details,
@JsonKey(name: "packets_count") int packetsCount,
@JsonKey(name: "packet1_options") dynamic packet1Options,
@JsonKey(name: "packet2_options") dynamic packet2Options,
@JsonKey(name: "packet3_options") dynamic packet3Options,
@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: "total_comments") int totalComments,
@JsonKey(name: "is_favorite") bool isFavorite});
@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;
}
@@ -488,6 +557,7 @@ class __$$PlanModelImplCopyWithImpl<$Res>
@override
$Res call({
Object? id = null,
Object? slug = null,
Object? name = null,
Object? image = null,
Object? duration = null,
@@ -502,12 +572,17 @@ class __$$PlanModelImplCopyWithImpl<$Res>
Object? totalLikes = null,
Object? totalViews = null,
Object? totalComments = null,
Object? isFavorite = 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
@@ -539,15 +614,15 @@ class __$$PlanModelImplCopyWithImpl<$Res>
packet1Options: freezed == packet1Options
? _value.packet1Options
: packet1Options // ignore: cast_nullable_to_non_nullable
as dynamic,
as PacketOptions?,
packet2Options: freezed == packet2Options
? _value.packet2Options
: packet2Options // ignore: cast_nullable_to_non_nullable
as dynamic,
as PacketOptions?,
packet3Options: freezed == packet3Options
? _value.packet3Options
: packet3Options // ignore: cast_nullable_to_non_nullable
as dynamic,
as PacketOptions?,
author: null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
@@ -564,6 +639,10 @@ class __$$PlanModelImplCopyWithImpl<$Res>
? _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,
));
}
}
@@ -573,6 +652,7 @@ class __$$PlanModelImplCopyWithImpl<$Res>
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,
@@ -586,7 +666,8 @@ class _$PlanModelImpl implements _PlanModel {
@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: "total_comments") required this.totalComments,
@JsonKey(name: "is_favorite") required this.isFavorite});
factory _$PlanModelImpl.fromJson(Map<String, dynamic> json) =>
_$$PlanModelImplFromJson(json);
@@ -595,6 +676,9 @@ class _$PlanModelImpl implements _PlanModel {
@JsonKey(name: "id")
final int id;
@override
@JsonKey(name: "slug")
final String slug;
@override
@JsonKey(name: "name")
final String name;
@override
@@ -617,13 +701,13 @@ class _$PlanModelImpl implements _PlanModel {
final int packetsCount;
@override
@JsonKey(name: "packet1_options")
final dynamic packet1Options;
final PacketOptions? packet1Options;
@override
@JsonKey(name: "packet2_options")
final dynamic packet2Options;
final PacketOptions? packet2Options;
@override
@JsonKey(name: "packet3_options")
final dynamic packet3Options;
final PacketOptions? packet3Options;
@override
@JsonKey(name: "author")
final Author author;
@@ -636,10 +720,13 @@ class _$PlanModelImpl implements _PlanModel {
@override
@JsonKey(name: "total_comments")
final int totalComments;
@override
@JsonKey(name: "is_favorite")
final bool isFavorite;
@override
String toString() {
return 'PlanModel(id: $id, 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)';
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)';
}
@override
@@ -648,6 +735,7 @@ class _$PlanModelImpl implements _PlanModel {
(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) ||
@@ -657,19 +745,21 @@ class _$PlanModelImpl implements _PlanModel {
(identical(other.details, details) || other.details == details) &&
(identical(other.packetsCount, packetsCount) ||
other.packetsCount == packetsCount) &&
const DeepCollectionEquality()
.equals(other.packet1Options, packet1Options) &&
const DeepCollectionEquality()
.equals(other.packet2Options, packet2Options) &&
const DeepCollectionEquality()
.equals(other.packet3Options, packet3Options) &&
(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));
other.totalComments == totalComments) &&
(identical(other.isFavorite, isFavorite) ||
other.isFavorite == isFavorite));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -677,6 +767,7 @@ class _$PlanModelImpl implements _PlanModel {
int get hashCode => Object.hash(
runtimeType,
id,
slug,
name,
image,
duration,
@@ -684,13 +775,14 @@ class _$PlanModelImpl implements _PlanModel {
type,
details,
packetsCount,
const DeepCollectionEquality().hash(packet1Options),
const DeepCollectionEquality().hash(packet2Options),
const DeepCollectionEquality().hash(packet3Options),
packet1Options,
packet2Options,
packet3Options,
author,
totalLikes,
totalViews,
totalComments);
totalComments,
isFavorite);
/// Create a copy of PlanModel
/// with the given fields replaced by the non-null parameter values.
@@ -711,6 +803,7 @@ class _$PlanModelImpl implements _PlanModel {
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,
@@ -718,13 +811,14 @@ abstract class _PlanModel implements PlanModel {
@JsonKey(name: "type") required final PlanType type,
@JsonKey(name: "details") required final String details,
@JsonKey(name: "packets_count") required final int packetsCount,
@JsonKey(name: "packet1_options") final dynamic packet1Options,
@JsonKey(name: "packet2_options") final dynamic packet2Options,
@JsonKey(name: "packet3_options") final dynamic packet3Options,
@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: "total_comments") required final int totalComments,
@JsonKey(name: "is_favorite") required final bool isFavorite}) =
_$PlanModelImpl;
factory _PlanModel.fromJson(Map<String, dynamic> json) =
@@ -734,6 +828,9 @@ abstract class _PlanModel implements PlanModel {
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "slug")
String get slug;
@override
@JsonKey(name: "name")
String get name;
@override
@@ -756,13 +853,13 @@ abstract class _PlanModel implements PlanModel {
int get packetsCount;
@override
@JsonKey(name: "packet1_options")
dynamic get packet1Options;
PacketOptions? get packet1Options;
@override
@JsonKey(name: "packet2_options")
dynamic get packet2Options;
PacketOptions? get packet2Options;
@override
@JsonKey(name: "packet3_options")
dynamic get packet3Options;
PacketOptions? get packet3Options;
@override
@JsonKey(name: "author")
Author get author;
@@ -775,6 +872,9 @@ abstract class _PlanModel implements PlanModel {
@override
@JsonKey(name: "total_comments")
int get totalComments;
@override
@JsonKey(name: "is_favorite")
bool get isFavorite;
/// Create a copy of PlanModel
/// with the given fields replaced by the non-null parameter values.
@@ -1030,13 +1130,13 @@ PlanType _$PlanTypeFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$PlanType {
@JsonKey(name: "fit")
bool get fit => throw _privateConstructorUsedError;
bool? get fit => throw _privateConstructorUsedError;
@JsonKey(name: "slim")
bool get slim => throw _privateConstructorUsedError;
bool? get slim => throw _privateConstructorUsedError;
@JsonKey(name: "behavior")
bool get behavior => throw _privateConstructorUsedError;
bool? get behavior => throw _privateConstructorUsedError;
@JsonKey(name: "wellness")
bool get wellness => throw _privateConstructorUsedError;
bool? get wellness => throw _privateConstructorUsedError;
/// Serializes this PlanType to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@@ -1054,10 +1154,10 @@ abstract class $PlanTypeCopyWith<$Res> {
_$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});
{@JsonKey(name: "fit") bool? fit,
@JsonKey(name: "slim") bool? slim,
@JsonKey(name: "behavior") bool? behavior,
@JsonKey(name: "wellness") bool? wellness});
}
/// @nodoc
@@ -1075,28 +1175,28 @@ class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType>
@pragma('vm:prefer-inline')
@override
$Res call({
Object? fit = null,
Object? slim = null,
Object? behavior = null,
Object? wellness = null,
Object? fit = freezed,
Object? slim = freezed,
Object? behavior = freezed,
Object? wellness = freezed,
}) {
return _then(_value.copyWith(
fit: null == fit
fit: freezed == fit
? _value.fit
: fit // ignore: cast_nullable_to_non_nullable
as bool,
slim: null == slim
as bool?,
slim: freezed == slim
? _value.slim
: slim // ignore: cast_nullable_to_non_nullable
as bool,
behavior: null == behavior
as bool?,
behavior: freezed == behavior
? _value.behavior
: behavior // ignore: cast_nullable_to_non_nullable
as bool,
wellness: null == wellness
as bool?,
wellness: freezed == wellness
? _value.wellness
: wellness // ignore: cast_nullable_to_non_nullable
as bool,
as bool?,
) as $Val);
}
}
@@ -1110,10 +1210,10 @@ abstract class _$$PlanTypeImplCopyWith<$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});
{@JsonKey(name: "fit") bool? fit,
@JsonKey(name: "slim") bool? slim,
@JsonKey(name: "behavior") bool? behavior,
@JsonKey(name: "wellness") bool? wellness});
}
/// @nodoc
@@ -1129,56 +1229,57 @@ class __$$PlanTypeImplCopyWithImpl<$Res>
@pragma('vm:prefer-inline')
@override
$Res call({
Object? fit = null,
Object? slim = null,
Object? behavior = null,
Object? wellness = null,
Object? fit = freezed,
Object? slim = freezed,
Object? behavior = freezed,
Object? wellness = freezed,
}) {
return _then(_$PlanTypeImpl(
fit: null == fit
fit: freezed == fit
? _value.fit
: fit // ignore: cast_nullable_to_non_nullable
as bool,
slim: null == slim
as bool?,
slim: freezed == slim
? _value.slim
: slim // ignore: cast_nullable_to_non_nullable
as bool,
behavior: null == behavior
as bool?,
behavior: freezed == behavior
? _value.behavior
: behavior // ignore: cast_nullable_to_non_nullable
as bool,
wellness: null == wellness
as bool?,
wellness: freezed == wellness
? _value.wellness
: wellness // ignore: cast_nullable_to_non_nullable
as bool,
as bool?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$PlanTypeImpl implements _PlanType {
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});
@JsonKey(name: "wellness") required this.wellness})
: super._();
factory _$PlanTypeImpl.fromJson(Map<String, dynamic> json) =>
_$$PlanTypeImplFromJson(json);
@override
@JsonKey(name: "fit")
final bool fit;
final bool? fit;
@override
@JsonKey(name: "slim")
final bool slim;
final bool? slim;
@override
@JsonKey(name: "behavior")
final bool behavior;
final bool? behavior;
@override
@JsonKey(name: "wellness")
final bool wellness;
final bool? wellness;
@override
String toString() {
@@ -1218,29 +1319,30 @@ class _$PlanTypeImpl implements _PlanType {
}
}
abstract class _PlanType implements PlanType {
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}) =
{@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;
bool? get fit;
@override
@JsonKey(name: "slim")
bool get slim;
bool? get slim;
@override
@JsonKey(name: "behavior")
bool get behavior;
bool? get behavior;
@override
@JsonKey(name: "wellness")
bool get wellness;
bool? get wellness;
/// Create a copy of PlanType
/// with the given fields replaced by the non-null parameter values.