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

@@ -24,7 +24,6 @@ mixin _$CalendarState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -71,16 +70,18 @@ mixin _$CalendarState {
/// @nodoc
abstract class $CalendarStateCopyWith<$Res> {
factory $CalendarStateCopyWith(CalendarState value, $Res Function(CalendarState) then) = _$CalendarStateCopyWithImpl<$Res, CalendarState>;
factory $CalendarStateCopyWith(
CalendarState value, $Res Function(CalendarState) then) =
_$CalendarStateCopyWithImpl<$Res, CalendarState>;
}
/// @nodoc
class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> implements $CalendarStateCopyWith<$Res> {
class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState>
implements $CalendarStateCopyWith<$Res> {
_$CalendarStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -90,12 +91,18 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> implements $
/// @nodoc
abstract class _$$CalendarStateImplCopyWith<$Res> {
factory _$$CalendarStateImplCopyWith(_$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) = __$$CalendarStateImplCopyWithImpl<$Res>;
factory _$$CalendarStateImplCopyWith(
_$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) =
__$$CalendarStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$CalendarStateImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl> implements _$$CalendarStateImplCopyWith<$Res> {
__$$CalendarStateImplCopyWithImpl(_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then) : super(_value, _then);
class __$$CalendarStateImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl>
implements _$$CalendarStateImplCopyWith<$Res> {
__$$CalendarStateImplCopyWithImpl(
_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then)
: super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -113,7 +120,8 @@ class _$CalendarStateImpl implements _CalendarState {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CalendarStateImpl);
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$CalendarStateImpl);
}
@override
@@ -200,14 +208,18 @@ abstract class _CalendarState implements CalendarState {
/// @nodoc
abstract class _$$CalendarStateLoadingImplCopyWith<$Res> {
factory _$$CalendarStateLoadingImplCopyWith(_$CalendarStateLoadingImpl value, $Res Function(_$CalendarStateLoadingImpl) then) =
factory _$$CalendarStateLoadingImplCopyWith(_$CalendarStateLoadingImpl value,
$Res Function(_$CalendarStateLoadingImpl) then) =
__$$CalendarStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$CalendarStateLoadingImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadingImpl>
class __$$CalendarStateLoadingImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadingImpl>
implements _$$CalendarStateLoadingImplCopyWith<$Res> {
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value, $Res Function(_$CalendarStateLoadingImpl) _then) : super(_value, _then);
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value,
$Res Function(_$CalendarStateLoadingImpl) _then)
: super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -225,7 +237,9 @@ class _$CalendarStateLoadingImpl implements CalendarStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CalendarStateLoadingImpl);
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CalendarStateLoadingImpl);
}
@override
@@ -312,17 +326,20 @@ abstract class CalendarStateLoading implements CalendarState {
/// @nodoc
abstract class _$$CalendarStateLoadedImplCopyWith<$Res> {
factory _$$CalendarStateLoadedImplCopyWith(_$CalendarStateLoadedImpl value, $Res Function(_$CalendarStateLoadedImpl) then) =
factory _$$CalendarStateLoadedImplCopyWith(_$CalendarStateLoadedImpl value,
$Res Function(_$CalendarStateLoadedImpl) then) =
__$$CalendarStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({List<CalendarModel> calendarList});
}
/// @nodoc
class __$$CalendarStateLoadedImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadedImpl>
class __$$CalendarStateLoadedImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadedImpl>
implements _$$CalendarStateLoadedImplCopyWith<$Res> {
__$$CalendarStateLoadedImplCopyWithImpl(_$CalendarStateLoadedImpl _value, $Res Function(_$CalendarStateLoadedImpl) _then) : super(_value, _then);
__$$CalendarStateLoadedImplCopyWithImpl(_$CalendarStateLoadedImpl _value,
$Res Function(_$CalendarStateLoadedImpl) _then)
: super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -343,10 +360,11 @@ class __$$CalendarStateLoadedImplCopyWithImpl<$Res> extends _$CalendarStateCopyW
/// @nodoc
class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
const _$CalendarStateLoadedImpl({required final List<CalendarModel> calendarList}) : _calendarList = calendarList;
const _$CalendarStateLoadedImpl(
{required final List<CalendarModel> calendarList})
: _calendarList = calendarList;
final List<CalendarModel> _calendarList;
@override
List<CalendarModel> get calendarList {
if (_calendarList is EqualUnmodifiableListView) return _calendarList;
@@ -362,11 +380,15 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$CalendarStateLoadedImpl && const DeepCollectionEquality().equals(other._calendarList, _calendarList));
(other.runtimeType == runtimeType &&
other is _$CalendarStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._calendarList, _calendarList));
}
@override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_calendarList));
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_calendarList));
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -374,7 +396,8 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(this, _$identity);
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(
this, _$identity);
@override
@optionalTypeArgs
@@ -452,29 +475,35 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
}
abstract class CalendarStateLoaded implements CalendarState {
const factory CalendarStateLoaded({required final List<CalendarModel> calendarList}) = _$CalendarStateLoadedImpl;
const factory CalendarStateLoaded(
{required final List<CalendarModel> calendarList}) =
_$CalendarStateLoadedImpl;
List<CalendarModel> get calendarList;
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$CalendarStateErrorImplCopyWith<$Res> {
factory _$$CalendarStateErrorImplCopyWith(_$CalendarStateErrorImpl value, $Res Function(_$CalendarStateErrorImpl) then) =
factory _$$CalendarStateErrorImplCopyWith(_$CalendarStateErrorImpl value,
$Res Function(_$CalendarStateErrorImpl) then) =
__$$CalendarStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$CalendarStateErrorImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateErrorImpl>
class __$$CalendarStateErrorImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateErrorImpl>
implements _$$CalendarStateErrorImplCopyWith<$Res> {
__$$CalendarStateErrorImplCopyWithImpl(_$CalendarStateErrorImpl _value, $Res Function(_$CalendarStateErrorImpl) _then) : super(_value, _then);
__$$CalendarStateErrorImplCopyWithImpl(_$CalendarStateErrorImpl _value,
$Res Function(_$CalendarStateErrorImpl) _then)
: super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -510,7 +539,8 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CalendarStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
}
@override
@@ -522,7 +552,8 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
@override
@pragma('vm:prefer-inline')
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(this, _$identity);
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(
this, _$identity);
@override
@optionalTypeArgs
@@ -600,12 +631,14 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
}
abstract class CalendarStateError implements CalendarState {
const factory CalendarStateError({required final String errorMessage}) = _$CalendarStateErrorImpl;
const factory CalendarStateError({required final String errorMessage}) =
_$CalendarStateErrorImpl;
String get errorMessage;
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -1,15 +1,14 @@
import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_cubit.dart';
import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_state.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:eatvio_app/theme/app_decoration.dart';
import 'package:eatvio_app/theme/custom_text_style.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
class CalendarScreen extends StatelessWidget {
CalendarScreen({Key? key}) : super(key: key);