feat(profile): add profile charts models, requests. Max length of description in posts, recipes, diets = 200

This commit is contained in:
mso7nueh
2024-09-13 14:22:57 +03:00
parent a826cba866
commit c800d35663
111 changed files with 5760 additions and 3215 deletions

View File

@@ -21,13 +21,9 @@ Portion _$PortionFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Portion {
int get id => throw _privateConstructorUsedError;
String get product_name => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError;
bool get from_diet => throw _privateConstructorUsedError;
/// Serializes this Portion to a JSON map.
@@ -41,19 +37,24 @@ mixin _$Portion {
/// @nodoc
abstract class $PortionCopyWith<$Res> {
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) = _$PortionCopyWithImpl<$Res, Portion>;
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) =
_$PortionCopyWithImpl<$Res, Portion>;
@useResult
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
$Res call(
{int id,
String product_name,
int quantity,
String portion,
bool from_diet});
}
/// @nodoc
class _$PortionCopyWithImpl<$Res, $Val extends Portion> implements $PortionCopyWith<$Res> {
class _$PortionCopyWithImpl<$Res, $Val extends Portion>
implements $PortionCopyWith<$Res> {
_$PortionCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -95,16 +96,26 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion> implements $PortionCopyW
/// @nodoc
abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> {
factory _$$PortionImplCopyWith(_$PortionImpl value, $Res Function(_$PortionImpl) then) = __$$PortionImplCopyWithImpl<$Res>;
factory _$$PortionImplCopyWith(
_$PortionImpl value, $Res Function(_$PortionImpl) then) =
__$$PortionImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
$Res call(
{int id,
String product_name,
int quantity,
String portion,
bool from_diet});
}
/// @nodoc
class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$PortionImpl> implements _$$PortionImplCopyWith<$Res> {
__$$PortionImplCopyWithImpl(_$PortionImpl _value, $Res Function(_$PortionImpl) _then) : super(_value, _then);
class __$$PortionImplCopyWithImpl<$Res>
extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
implements _$$PortionImplCopyWith<$Res> {
__$$PortionImplCopyWithImpl(
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
: super(_value, _then);
/// Create a copy of Portion
/// with the given fields replaced by the non-null parameter values.
@@ -145,9 +156,15 @@ class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$Po
/// @nodoc
@JsonSerializable()
class _$PortionImpl implements _Portion {
const _$PortionImpl({required this.id, required this.product_name, required this.quantity, required this.portion, required this.from_diet});
const _$PortionImpl(
{required this.id,
required this.product_name,
required this.quantity,
required this.portion,
required this.from_diet});
factory _$PortionImpl.fromJson(Map<String, dynamic> json) => _$$PortionImplFromJson(json);
factory _$PortionImpl.fromJson(Map<String, dynamic> json) =>
_$$PortionImplFromJson(json);
@override
final int id;
@@ -171,22 +188,27 @@ class _$PortionImpl implements _Portion {
(other.runtimeType == runtimeType &&
other is _$PortionImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.product_name, product_name) || other.product_name == product_name) &&
(identical(other.quantity, quantity) || other.quantity == quantity) &&
(identical(other.product_name, product_name) ||
other.product_name == product_name) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.portion, portion) || other.portion == portion) &&
(identical(other.from_diet, from_diet) || other.from_diet == from_diet));
(identical(other.from_diet, from_diet) ||
other.from_diet == from_diet));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
int get hashCode =>
Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
/// Create a copy of Portion
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => __$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
__$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -208,16 +230,12 @@ abstract class _Portion implements Portion {
@override
int get id;
@override
String get product_name;
@override
int get quantity;
@override
String get portion;
@override
bool get from_diet;
@@ -225,5 +243,6 @@ abstract class _Portion implements Portion {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => throw _privateConstructorUsedError;
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
throw _privateConstructorUsedError;
}