fix: charts, profile, bottom nav bar

This commit is contained in:
mso7nueh
2024-09-18 16:14:00 +03:00
parent c800d35663
commit d771feefe3
81 changed files with 1478 additions and 2209 deletions

View File

@@ -1,6 +1,7 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'ingredient.freezed.dart';
part 'ingredient.g.dart';
@freezed

View File

@@ -3,6 +3,7 @@ import 'package:eatvio_app/features/recipes/models/step.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'recipe_model.freezed.dart';
part 'recipe_model.g.dart';
@freezed

View File

@@ -22,8 +22,10 @@ RecipeTagModel _$RecipeTagModelFromJson(Map<String, dynamic> json) {
mixin _$RecipeTagModel {
@JsonKey(name: "data")
List<RecipeTag> get data => throw _privateConstructorUsedError;
@JsonKey(name: "links")
Links get links => throw _privateConstructorUsedError;
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
@@ -33,32 +35,28 @@ mixin _$RecipeTagModel {
/// Create a copy of RecipeTagModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith =>
throw _privateConstructorUsedError;
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipeTagModelCopyWith<$Res> {
factory $RecipeTagModelCopyWith(
RecipeTagModel value, $Res Function(RecipeTagModel) then) =
_$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>;
factory $RecipeTagModelCopyWith(RecipeTagModel value, $Res Function(RecipeTagModel) then) = _$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>;
@useResult
$Res call(
{@JsonKey(name: "data") List<RecipeTag> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<RecipeTag> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
$LinksCopyWith<$Res> get links;
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
implements $RecipeTagModelCopyWith<$Res> {
class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> implements $RecipeTagModelCopyWith<$Res> {
_$RecipeTagModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -109,31 +107,23 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
}
/// @nodoc
abstract class _$$RecipeTagModelImplCopyWith<$Res>
implements $RecipeTagModelCopyWith<$Res> {
factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value,
$Res Function(_$RecipeTagModelImpl) then) =
__$$RecipeTagModelImplCopyWithImpl<$Res>;
abstract class _$$RecipeTagModelImplCopyWith<$Res> implements $RecipeTagModelCopyWith<$Res> {
factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value, $Res Function(_$RecipeTagModelImpl) then) = __$$RecipeTagModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "data") List<RecipeTag> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<RecipeTag> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
@override
$LinksCopyWith<$Res> get links;
@override
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$RecipeTagModelImplCopyWithImpl<$Res>
extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl>
implements _$$RecipeTagModelImplCopyWith<$Res> {
__$$RecipeTagModelImplCopyWithImpl(
_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then)
: super(_value, _then);
class __$$RecipeTagModelImplCopyWithImpl<$Res> extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl> implements _$$RecipeTagModelImplCopyWith<$Res> {
__$$RecipeTagModelImplCopyWithImpl(_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then) : super(_value, _then);
/// Create a copy of RecipeTagModel
/// with the given fields replaced by the non-null parameter values.
@@ -165,15 +155,13 @@ class __$$RecipeTagModelImplCopyWithImpl<$Res>
@JsonSerializable()
class _$RecipeTagModelImpl implements _RecipeTagModel {
const _$RecipeTagModelImpl(
{@JsonKey(name: "data") required final List<RecipeTag> data,
@JsonKey(name: "links") required this.links,
@JsonKey(name: "meta") required this.meta})
{@JsonKey(name: "data") required final List<RecipeTag> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
: _data = data;
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipeTagModelImplFromJson(json);
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) => _$$RecipeTagModelImplFromJson(json);
final List<RecipeTag> _data;
@override
@JsonKey(name: "data")
List<RecipeTag> get data {
@@ -206,17 +194,14 @@ class _$RecipeTagModelImpl implements _RecipeTagModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
/// Create a copy of RecipeTagModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
__$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(
this, _$identity);
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => __$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -232,15 +217,16 @@ abstract class _RecipeTagModel implements RecipeTagModel {
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta}) = _$RecipeTagModelImpl;
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) =
_$RecipeTagModelImpl.fromJson;
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) = _$RecipeTagModelImpl.fromJson;
@override
@JsonKey(name: "data")
List<RecipeTag> get data;
@override
@JsonKey(name: "links")
Links get links;
@override
@JsonKey(name: "meta")
Meta get meta;
@@ -249,8 +235,7 @@ abstract class _RecipeTagModel implements RecipeTagModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => throw _privateConstructorUsedError;
}
RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
@@ -261,12 +246,16 @@ RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
mixin _$RecipeTag {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "recipes_count")
int get recipesCount => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
@@ -276,14 +265,13 @@ mixin _$RecipeTag {
/// Create a copy of RecipeTag
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RecipeTagCopyWith<RecipeTag> get copyWith =>
throw _privateConstructorUsedError;
$RecipeTagCopyWith<RecipeTag> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipeTagCopyWith<$Res> {
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) =
_$RecipeTagCopyWithImpl<$Res, RecipeTag>;
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) = _$RecipeTagCopyWithImpl<$Res, RecipeTag>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -294,12 +282,12 @@ abstract class $RecipeTagCopyWith<$Res> {
}
/// @nodoc
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag>
implements $RecipeTagCopyWith<$Res> {
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> implements $RecipeTagCopyWith<$Res> {
_$RecipeTagCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -340,11 +328,9 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag>
}
/// @nodoc
abstract class _$$RecipeTagImplCopyWith<$Res>
implements $RecipeTagCopyWith<$Res> {
factory _$$RecipeTagImplCopyWith(
_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) =
__$$RecipeTagImplCopyWithImpl<$Res>;
abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$Res> {
factory _$$RecipeTagImplCopyWith(_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) = __$$RecipeTagImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -356,12 +342,8 @@ abstract class _$$RecipeTagImplCopyWith<$Res>
}
/// @nodoc
class __$$RecipeTagImplCopyWithImpl<$Res>
extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl>
implements _$$RecipeTagImplCopyWith<$Res> {
__$$RecipeTagImplCopyWithImpl(
_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then)
: super(_value, _then);
class __$$RecipeTagImplCopyWithImpl<$Res> extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl> implements _$$RecipeTagImplCopyWith<$Res> {
__$$RecipeTagImplCopyWithImpl(_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then) : super(_value, _then);
/// Create a copy of RecipeTag
/// with the given fields replaced by the non-null parameter values.
@@ -409,8 +391,7 @@ class _$RecipeTagImpl implements _RecipeTag {
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt});
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipeTagImplFromJson(json);
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) => _$$RecipeTagImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -440,26 +421,21 @@ class _$RecipeTagImpl implements _RecipeTag {
other is _$RecipeTagImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.recipesCount, recipesCount) ||
other.recipesCount == recipesCount) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
(identical(other.recipesCount, recipesCount) || other.recipesCount == recipesCount) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
int get hashCode => Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
/// Create a copy of RecipeTag
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
__$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith => __$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -471,28 +447,30 @@ class _$RecipeTagImpl implements _RecipeTag {
abstract class _RecipeTag implements RecipeTag {
const factory _RecipeTag(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "recipes_count") required final int recipesCount,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt}) =
_$RecipeTagImpl;
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "recipes_count") required final int recipesCount,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt}) = _$RecipeTagImpl;
factory _RecipeTag.fromJson(Map<String, dynamic> json) =
_$RecipeTagImpl.fromJson;
factory _RecipeTag.fromJson(Map<String, dynamic> json) = _$RecipeTagImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "recipes_count")
int get recipesCount;
@override
@JsonKey(name: "created_at")
DateTime get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
@@ -501,6 +479,5 @@ abstract class _RecipeTag implements RecipeTag {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,25 +6,19 @@ part of 'recipe_tag_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) =>
_$RecipeTagModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) => RecipeTag.fromJson(e as Map<String, dynamic>))
.toList(),
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) => _$RecipeTagModelImpl(
data: (json['data'] as List<dynamic>).map((e) => RecipeTag.fromJson(e as Map<String, dynamic>)).toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$RecipeTagModelImplToJson(
_$RecipeTagModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$RecipeTagModelImplToJson(_$RecipeTagModelImpl instance) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) =>
_$RecipeTagImpl(
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) => _$RecipeTagImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
recipesCount: (json['recipes_count'] as num).toInt(),
@@ -32,8 +26,7 @@ _$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) =>
updatedAt: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'recipes_count': instance.recipesCount,

View File

@@ -1,6 +1,7 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'step.freezed.dart';
part 'step.g.dart';
@freezed