feat(diary): add diary page, calendar, meals

This commit is contained in:
mso7nueh
2024-10-24 16:59:51 +03:00
parent e2b54cca99
commit 1883b93315
52 changed files with 2480 additions and 5592 deletions

View File

@@ -12,7 +12,6 @@ class BadgeModel with _$BadgeModel {
required String description,
required String image,
required String type,
required List<String> parameters,
}) = _BadgeModel;
factory BadgeModel.fromJson(Map<String, Object?> json) => _$BadgeModelFromJson(json);

View File

@@ -25,7 +25,6 @@ mixin _$BadgeModel {
String get description => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError;
String get type => throw _privateConstructorUsedError;
List<String> get parameters => throw _privateConstructorUsedError;
/// Serializes this BadgeModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@@ -44,12 +43,7 @@ abstract class $BadgeModelCopyWith<$Res> {
_$BadgeModelCopyWithImpl<$Res, BadgeModel>;
@useResult
$Res call(
{int id,
String title,
String description,
String image,
String type,
List<String> parameters});
{int id, String title, String description, String image, String type});
}
/// @nodoc
@@ -72,7 +66,6 @@ class _$BadgeModelCopyWithImpl<$Res, $Val extends BadgeModel>
Object? description = null,
Object? image = null,
Object? type = null,
Object? parameters = null,
}) {
return _then(_value.copyWith(
id: null == id
@@ -95,10 +88,6 @@ class _$BadgeModelCopyWithImpl<$Res, $Val extends BadgeModel>
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
parameters: null == parameters
? _value.parameters
: parameters // ignore: cast_nullable_to_non_nullable
as List<String>,
) as $Val);
}
}
@@ -112,12 +101,7 @@ abstract class _$$BadgeModelImplCopyWith<$Res>
@override
@useResult
$Res call(
{int id,
String title,
String description,
String image,
String type,
List<String> parameters});
{int id, String title, String description, String image, String type});
}
/// @nodoc
@@ -138,7 +122,6 @@ class __$$BadgeModelImplCopyWithImpl<$Res>
Object? description = null,
Object? image = null,
Object? type = null,
Object? parameters = null,
}) {
return _then(_$BadgeModelImpl(
id: null == id
@@ -161,10 +144,6 @@ class __$$BadgeModelImplCopyWithImpl<$Res>
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
parameters: null == parameters
? _value._parameters
: parameters // ignore: cast_nullable_to_non_nullable
as List<String>,
));
}
}
@@ -177,9 +156,7 @@ class _$BadgeModelImpl implements _BadgeModel {
required this.title,
required this.description,
required this.image,
required this.type,
required final List<String> parameters})
: _parameters = parameters;
required this.type});
factory _$BadgeModelImpl.fromJson(Map<String, dynamic> json) =>
_$$BadgeModelImplFromJson(json);
@@ -194,17 +171,10 @@ class _$BadgeModelImpl implements _BadgeModel {
final String image;
@override
final String type;
final List<String> _parameters;
@override
List<String> get parameters {
if (_parameters is EqualUnmodifiableListView) return _parameters;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_parameters);
}
@override
String toString() {
return 'BadgeModel(id: $id, title: $title, description: $description, image: $image, type: $type, parameters: $parameters)';
return 'BadgeModel(id: $id, title: $title, description: $description, image: $image, type: $type)';
}
@override
@@ -217,15 +187,13 @@ class _$BadgeModelImpl implements _BadgeModel {
(identical(other.description, description) ||
other.description == description) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.type, type) || other.type == type) &&
const DeepCollectionEquality()
.equals(other._parameters, _parameters));
(identical(other.type, type) || other.type == type));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, title, description, image,
type, const DeepCollectionEquality().hash(_parameters));
int get hashCode =>
Object.hash(runtimeType, id, title, description, image, type);
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.
@@ -249,8 +217,7 @@ abstract class _BadgeModel implements BadgeModel {
required final String title,
required final String description,
required final String image,
required final String type,
required final List<String> parameters}) = _$BadgeModelImpl;
required final String type}) = _$BadgeModelImpl;
factory _BadgeModel.fromJson(Map<String, dynamic> json) =
_$BadgeModelImpl.fromJson;
@@ -265,8 +232,6 @@ abstract class _BadgeModel implements BadgeModel {
String get image;
@override
String get type;
@override
List<String> get parameters;
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.

View File

@@ -13,9 +13,6 @@ _$BadgeModelImpl _$$BadgeModelImplFromJson(Map<String, dynamic> json) =>
description: json['description'] as String,
image: json['image'] as String,
type: json['type'] as String,
parameters: (json['parameters'] as List<dynamic>)
.map((e) => e as String)
.toList(),
);
Map<String, dynamic> _$$BadgeModelImplToJson(_$BadgeModelImpl instance) =>
@@ -25,5 +22,4 @@ Map<String, dynamic> _$$BadgeModelImplToJson(_$BadgeModelImpl instance) =>
'description': instance.description,
'image': instance.image,
'type': instance.type,
'parameters': instance.parameters,
};