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

@@ -22,13 +22,10 @@ Links _$LinksFromJson(Map<String, dynamic> json) {
mixin _$Links {
@JsonKey(name: "first")
String get first => throw _privateConstructorUsedError;
@JsonKey(name: "last")
String get last => throw _privateConstructorUsedError;
@JsonKey(name: "prev")
dynamic get prev => throw _privateConstructorUsedError;
@JsonKey(name: "next")
dynamic get next => throw _privateConstructorUsedError;
@@ -43,20 +40,23 @@ mixin _$Links {
/// @nodoc
abstract class $LinksCopyWith<$Res> {
factory $LinksCopyWith(Links value, $Res Function(Links) then) = _$LinksCopyWithImpl<$Res, Links>;
factory $LinksCopyWith(Links value, $Res Function(Links) then) =
_$LinksCopyWithImpl<$Res, Links>;
@useResult
$Res call(
{@JsonKey(name: "first") String first, @JsonKey(name: "last") String last, @JsonKey(name: "prev") dynamic prev, @JsonKey(name: "next") dynamic next});
{@JsonKey(name: "first") String first,
@JsonKey(name: "last") String last,
@JsonKey(name: "prev") dynamic prev,
@JsonKey(name: "next") dynamic next});
}
/// @nodoc
class _$LinksCopyWithImpl<$Res, $Val extends Links> implements $LinksCopyWith<$Res> {
class _$LinksCopyWithImpl<$Res, $Val extends Links>
implements $LinksCopyWith<$Res> {
_$LinksCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -93,17 +93,25 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links> implements $LinksCopyWith<$R
/// @nodoc
abstract class _$$LinksImplCopyWith<$Res> implements $LinksCopyWith<$Res> {
factory _$$LinksImplCopyWith(_$LinksImpl value, $Res Function(_$LinksImpl) then) = __$$LinksImplCopyWithImpl<$Res>;
factory _$$LinksImplCopyWith(
_$LinksImpl value, $Res Function(_$LinksImpl) then) =
__$$LinksImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "first") String first, @JsonKey(name: "last") String last, @JsonKey(name: "prev") dynamic prev, @JsonKey(name: "next") dynamic next});
{@JsonKey(name: "first") String first,
@JsonKey(name: "last") String last,
@JsonKey(name: "prev") dynamic prev,
@JsonKey(name: "next") dynamic next});
}
/// @nodoc
class __$$LinksImplCopyWithImpl<$Res> extends _$LinksCopyWithImpl<$Res, _$LinksImpl> implements _$$LinksImplCopyWith<$Res> {
__$$LinksImplCopyWithImpl(_$LinksImpl _value, $Res Function(_$LinksImpl) _then) : super(_value, _then);
class __$$LinksImplCopyWithImpl<$Res>
extends _$LinksCopyWithImpl<$Res, _$LinksImpl>
implements _$$LinksImplCopyWith<$Res> {
__$$LinksImplCopyWithImpl(
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
: super(_value, _then);
/// Create a copy of Links
/// with the given fields replaced by the non-null parameter values.
@@ -145,7 +153,8 @@ class _$LinksImpl implements _Links {
@JsonKey(name: "prev") required this.prev,
@JsonKey(name: "next") required this.next});
factory _$LinksImpl.fromJson(Map<String, dynamic> json) => _$$LinksImplFromJson(json);
factory _$LinksImpl.fromJson(Map<String, dynamic> json) =>
_$$LinksImplFromJson(json);
@override
@JsonKey(name: "first")
@@ -178,14 +187,20 @@ class _$LinksImpl implements _Links {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, first, last, const DeepCollectionEquality().hash(prev), const DeepCollectionEquality().hash(next));
int get hashCode => Object.hash(
runtimeType,
first,
last,
const DeepCollectionEquality().hash(prev),
const DeepCollectionEquality().hash(next));
/// Create a copy of Links
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LinksImplCopyWith<_$LinksImpl> get copyWith => __$$LinksImplCopyWithImpl<_$LinksImpl>(this, _$identity);
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
__$$LinksImplCopyWithImpl<_$LinksImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -207,15 +222,12 @@ abstract class _Links implements Links {
@override
@JsonKey(name: "first")
String get first;
@override
@JsonKey(name: "last")
String get last;
@override
@JsonKey(name: "prev")
dynamic get prev;
@override
@JsonKey(name: "next")
dynamic get next;
@@ -224,7 +236,8 @@ abstract class _Links implements Links {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LinksImplCopyWith<_$LinksImpl> get copyWith => throw _privateConstructorUsedError;
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
throw _privateConstructorUsedError;
}
Meta _$MetaFromJson(Map<String, dynamic> json) {
@@ -235,25 +248,18 @@ Meta _$MetaFromJson(Map<String, dynamic> json) {
mixin _$Meta {
@JsonKey(name: "current_page")
int get currentPage => throw _privateConstructorUsedError;
@JsonKey(name: "from")
dynamic get from => throw _privateConstructorUsedError;
@JsonKey(name: "last_page")
int get lastPage => throw _privateConstructorUsedError;
@JsonKey(name: "links")
List<Link> get links => throw _privateConstructorUsedError;
@JsonKey(name: "path")
String? get path => throw _privateConstructorUsedError;
@JsonKey(name: "per_page")
int get perPage => throw _privateConstructorUsedError;
@JsonKey(name: "to")
dynamic get to => throw _privateConstructorUsedError;
@JsonKey(name: "total")
int get total => throw _privateConstructorUsedError;
@@ -268,8 +274,8 @@ mixin _$Meta {
/// @nodoc
abstract class $MetaCopyWith<$Res> {
factory $MetaCopyWith(Meta value, $Res Function(Meta) then) = _$MetaCopyWithImpl<$Res, Meta>;
factory $MetaCopyWith(Meta value, $Res Function(Meta) then) =
_$MetaCopyWithImpl<$Res, Meta>;
@useResult
$Res call(
{@JsonKey(name: "current_page") int currentPage,
@@ -283,12 +289,12 @@ abstract class $MetaCopyWith<$Res> {
}
/// @nodoc
class _$MetaCopyWithImpl<$Res, $Val extends Meta> implements $MetaCopyWith<$Res> {
class _$MetaCopyWithImpl<$Res, $Val extends Meta>
implements $MetaCopyWith<$Res> {
_$MetaCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -345,8 +351,9 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta> implements $MetaCopyWith<$Res>
/// @nodoc
abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> {
factory _$$MetaImplCopyWith(_$MetaImpl value, $Res Function(_$MetaImpl) then) = __$$MetaImplCopyWithImpl<$Res>;
factory _$$MetaImplCopyWith(
_$MetaImpl value, $Res Function(_$MetaImpl) then) =
__$$MetaImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -361,8 +368,11 @@ abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> {
}
/// @nodoc
class __$$MetaImplCopyWithImpl<$Res> extends _$MetaCopyWithImpl<$Res, _$MetaImpl> implements _$$MetaImplCopyWith<$Res> {
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then) : super(_value, _then);
class __$$MetaImplCopyWithImpl<$Res>
extends _$MetaCopyWithImpl<$Res, _$MetaImpl>
implements _$$MetaImplCopyWith<$Res> {
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
: super(_value, _then);
/// Create a copy of Meta
/// with the given fields replaced by the non-null parameter values.
@@ -429,7 +439,8 @@ class _$MetaImpl implements _Meta {
@JsonKey(name: "total") required this.total})
: _links = links;
factory _$MetaImpl.fromJson(Map<String, dynamic> json) => _$$MetaImplFromJson(json);
factory _$MetaImpl.fromJson(Map<String, dynamic> json) =>
_$$MetaImplFromJson(json);
@override
@JsonKey(name: "current_page")
@@ -441,7 +452,6 @@ class _$MetaImpl implements _Meta {
@JsonKey(name: "last_page")
final int lastPage;
final List<Link> _links;
@override
@JsonKey(name: "links")
List<Link> get links {
@@ -473,9 +483,11 @@ class _$MetaImpl implements _Meta {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MetaImpl &&
(identical(other.currentPage, currentPage) || other.currentPage == currentPage) &&
(identical(other.currentPage, currentPage) ||
other.currentPage == currentPage) &&
const DeepCollectionEquality().equals(other.from, from) &&
(identical(other.lastPage, lastPage) || other.lastPage == lastPage) &&
(identical(other.lastPage, lastPage) ||
other.lastPage == lastPage) &&
const DeepCollectionEquality().equals(other._links, _links) &&
(identical(other.path, path) || other.path == path) &&
(identical(other.perPage, perPage) || other.perPage == perPage) &&
@@ -485,15 +497,24 @@ class _$MetaImpl implements _Meta {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, currentPage, const DeepCollectionEquality().hash(from), lastPage, const DeepCollectionEquality().hash(_links),
path, perPage, const DeepCollectionEquality().hash(to), total);
int get hashCode => Object.hash(
runtimeType,
currentPage,
const DeepCollectionEquality().hash(from),
lastPage,
const DeepCollectionEquality().hash(_links),
path,
perPage,
const DeepCollectionEquality().hash(to),
total);
/// Create a copy of Meta
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$MetaImplCopyWith<_$MetaImpl> get copyWith => __$$MetaImplCopyWithImpl<_$MetaImpl>(this, _$identity);
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
__$$MetaImplCopyWithImpl<_$MetaImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -519,31 +540,24 @@ abstract class _Meta implements Meta {
@override
@JsonKey(name: "current_page")
int get currentPage;
@override
@JsonKey(name: "from")
dynamic get from;
@override
@JsonKey(name: "last_page")
int get lastPage;
@override
@JsonKey(name: "links")
List<Link> get links;
@override
@JsonKey(name: "path")
String? get path;
@override
@JsonKey(name: "per_page")
int get perPage;
@override
@JsonKey(name: "to")
dynamic get to;
@override
@JsonKey(name: "total")
int get total;
@@ -552,7 +566,8 @@ abstract class _Meta implements Meta {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$MetaImplCopyWith<_$MetaImpl> get copyWith => throw _privateConstructorUsedError;
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
throw _privateConstructorUsedError;
}
Link _$LinkFromJson(Map<String, dynamic> json) {
@@ -563,10 +578,8 @@ Link _$LinkFromJson(Map<String, dynamic> json) {
mixin _$Link {
@JsonKey(name: "url")
String? get url => throw _privateConstructorUsedError;
@JsonKey(name: "label")
String? get label => throw _privateConstructorUsedError;
@JsonKey(name: "active")
bool? get active => throw _privateConstructorUsedError;
@@ -581,19 +594,22 @@ mixin _$Link {
/// @nodoc
abstract class $LinkCopyWith<$Res> {
factory $LinkCopyWith(Link value, $Res Function(Link) then) = _$LinkCopyWithImpl<$Res, Link>;
factory $LinkCopyWith(Link value, $Res Function(Link) then) =
_$LinkCopyWithImpl<$Res, Link>;
@useResult
$Res call({@JsonKey(name: "url") String? url, @JsonKey(name: "label") String? label, @JsonKey(name: "active") bool? active});
$Res call(
{@JsonKey(name: "url") String? url,
@JsonKey(name: "label") String? label,
@JsonKey(name: "active") bool? active});
}
/// @nodoc
class _$LinkCopyWithImpl<$Res, $Val extends Link> implements $LinkCopyWith<$Res> {
class _$LinkCopyWithImpl<$Res, $Val extends Link>
implements $LinkCopyWith<$Res> {
_$LinkCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -625,16 +641,23 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link> implements $LinkCopyWith<$Res>
/// @nodoc
abstract class _$$LinkImplCopyWith<$Res> implements $LinkCopyWith<$Res> {
factory _$$LinkImplCopyWith(_$LinkImpl value, $Res Function(_$LinkImpl) then) = __$$LinkImplCopyWithImpl<$Res>;
factory _$$LinkImplCopyWith(
_$LinkImpl value, $Res Function(_$LinkImpl) then) =
__$$LinkImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: "url") String? url, @JsonKey(name: "label") String? label, @JsonKey(name: "active") bool? active});
$Res call(
{@JsonKey(name: "url") String? url,
@JsonKey(name: "label") String? label,
@JsonKey(name: "active") bool? active});
}
/// @nodoc
class __$$LinkImplCopyWithImpl<$Res> extends _$LinkCopyWithImpl<$Res, _$LinkImpl> implements _$$LinkImplCopyWith<$Res> {
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then) : super(_value, _then);
class __$$LinkImplCopyWithImpl<$Res>
extends _$LinkCopyWithImpl<$Res, _$LinkImpl>
implements _$$LinkImplCopyWith<$Res> {
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
: super(_value, _then);
/// Create a copy of Link
/// with the given fields replaced by the non-null parameter values.
@@ -665,9 +688,13 @@ class __$$LinkImplCopyWithImpl<$Res> extends _$LinkCopyWithImpl<$Res, _$LinkImpl
/// @nodoc
@JsonSerializable()
class _$LinkImpl implements _Link {
const _$LinkImpl({@JsonKey(name: "url") this.url, @JsonKey(name: "label") this.label, @JsonKey(name: "active") this.active});
const _$LinkImpl(
{@JsonKey(name: "url") this.url,
@JsonKey(name: "label") this.label,
@JsonKey(name: "active") this.active});
factory _$LinkImpl.fromJson(Map<String, dynamic> json) => _$$LinkImplFromJson(json);
factory _$LinkImpl.fromJson(Map<String, dynamic> json) =>
_$$LinkImplFromJson(json);
@override
@JsonKey(name: "url")
@@ -703,7 +730,8 @@ class _$LinkImpl implements _Link {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LinkImplCopyWith<_$LinkImpl> get copyWith => __$$LinkImplCopyWithImpl<_$LinkImpl>(this, _$identity);
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
__$$LinkImplCopyWithImpl<_$LinkImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -714,19 +742,19 @@ class _$LinkImpl implements _Link {
}
abstract class _Link implements Link {
const factory _Link({@JsonKey(name: "url") final String? url, @JsonKey(name: "label") final String? label, @JsonKey(name: "active") final bool? active}) =
_$LinkImpl;
const factory _Link(
{@JsonKey(name: "url") final String? url,
@JsonKey(name: "label") final String? label,
@JsonKey(name: "active") final bool? active}) = _$LinkImpl;
factory _Link.fromJson(Map<String, dynamic> json) = _$LinkImpl.fromJson;
@override
@JsonKey(name: "url")
String? get url;
@override
@JsonKey(name: "label")
String? get label;
@override
@JsonKey(name: "active")
bool? get active;
@@ -735,5 +763,6 @@ abstract class _Link implements Link {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LinkImplCopyWith<_$LinkImpl> get copyWith => throw _privateConstructorUsedError;
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -13,7 +13,8 @@ _$LinksImpl _$$LinksImplFromJson(Map<String, dynamic> json) => _$LinksImpl(
next: json['next'],
);
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) => <String, dynamic>{
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) =>
<String, dynamic>{
'first': instance.first,
'last': instance.last,
'prev': instance.prev,
@@ -24,14 +25,17 @@ _$MetaImpl _$$MetaImplFromJson(Map<String, dynamic> json) => _$MetaImpl(
currentPage: (json['current_page'] as num).toInt(),
from: json['from'],
lastPage: (json['last_page'] as num).toInt(),
links: (json['links'] as List<dynamic>).map((e) => Link.fromJson(e as Map<String, dynamic>)).toList(),
links: (json['links'] as List<dynamic>)
.map((e) => Link.fromJson(e as Map<String, dynamic>))
.toList(),
path: json['path'] as String?,
perPage: (json['per_page'] as num).toInt(),
to: json['to'],
total: (json['total'] as num).toInt(),
);
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) => <String, dynamic>{
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) =>
<String, dynamic>{
'current_page': instance.currentPage,
'from': instance.from,
'last_page': instance.lastPage,
@@ -48,7 +52,8 @@ _$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> json) => _$LinkImpl(
active: json['active'] as bool?,
);
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) => <String, dynamic>{
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) =>
<String, dynamic>{
'url': instance.url,
'label': instance.label,
'active': instance.active,