forked from eatvio/eatvio_app
refactor: profile model
This commit is contained in:
@@ -174,6 +174,9 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -190,6 +193,9 @@ class __$$DiaryStateImplCopyWithImpl<$Res>
|
||||
__$$DiaryStateImplCopyWithImpl(
|
||||
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -397,6 +403,8 @@ class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
|
||||
$Res Function(_$DiaryStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -435,7 +443,9 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||
@@ -611,7 +621,10 @@ abstract class DiaryStateLoading implements DiaryState {
|
||||
const factory DiaryStateLoading({final int? id}) = _$DiaryStateLoadingImpl;
|
||||
|
||||
int? get id;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -666,6 +679,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
$Res Function(_$DiaryStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -819,6 +834,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$DiaryModelCopyWith<$Res> get diary {
|
||||
@@ -827,6 +844,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MealCopyWith<$Res> get currentMeal {
|
||||
@@ -835,6 +854,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SelectionPopupModelCopyWith<$Res> get portionController {
|
||||
@@ -1100,7 +1121,9 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
const DeepCollectionEquality().hash(_chartDataCounted)
|
||||
]);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||
@@ -1420,7 +1443,10 @@ abstract class DiaryStateLoaded implements DiaryState {
|
||||
bool get isLoading;
|
||||
bool get isAdded;
|
||||
List<NutritionData>? get chartDataCounted;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1442,6 +1468,8 @@ class __$$DiaryStateErrorImplCopyWithImpl<$Res>
|
||||
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1481,7 +1509,9 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||
@@ -1658,7 +1688,10 @@ abstract class DiaryStateError implements DiaryState {
|
||||
_$DiaryStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:eatvio_app/features/diary/presentation/bloc/diary_state.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
@@ -29,7 +28,7 @@ class DiaryRecommendationsScreen extends StatelessWidget {
|
||||
} else if (state is DiaryStateLoading) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: CupertinoActivityIndicator(),
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
} else if (state is DiaryStateError) {
|
||||
|
||||
@@ -15,7 +15,6 @@ import 'package:eatvio_app/widgets/custom_scale_element.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
@@ -39,7 +38,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
} else if (state is DiaryStateLoading) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: CupertinoActivityIndicator(),
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
} else if (state is DiaryStateError) {
|
||||
|
||||
Reference in New Issue
Block a user