feat(profile): subscribers and subscriptions

This commit is contained in:
mso7nueh
2024-11-22 15:27:51 +03:00
parent f805505cb3
commit c909c75d47
45 changed files with 2790 additions and 451 deletions

View File

@@ -8,13 +8,13 @@ class ProductModerationModel with _$ProductModerationModel {
const factory ProductModerationModel({
required String name,
@JsonKey(name: 'energy_on_100gr')
required int energy,
required double energy,
@JsonKey(name: 'proteins_on_100gr')
required int proteins,
required double proteins,
@JsonKey(name: 'fats_on_100gr')
required int fats,
required double fats,
@JsonKey(name: 'carbohydrates_on_100gr')
required int carbohydrates,
required double carbohydrates,
}) = _ProductModerationModel;
factory ProductModerationModel.fromJson(Map<String, Object?> json) => _$ProductModerationModelFromJson(json);

View File

@@ -23,13 +23,13 @@ ProductModerationModel _$ProductModerationModelFromJson(
mixin _$ProductModerationModel {
String get name => throw _privateConstructorUsedError;
@JsonKey(name: 'energy_on_100gr')
int get energy => throw _privateConstructorUsedError;
double get energy => throw _privateConstructorUsedError;
@JsonKey(name: 'proteins_on_100gr')
int get proteins => throw _privateConstructorUsedError;
double get proteins => throw _privateConstructorUsedError;
@JsonKey(name: 'fats_on_100gr')
int get fats => throw _privateConstructorUsedError;
double get fats => throw _privateConstructorUsedError;
@JsonKey(name: 'carbohydrates_on_100gr')
int get carbohydrates => throw _privateConstructorUsedError;
double get carbohydrates => throw _privateConstructorUsedError;
/// Serializes this ProductModerationModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@@ -49,10 +49,10 @@ abstract class $ProductModerationModelCopyWith<$Res> {
@useResult
$Res call(
{String name,
@JsonKey(name: 'energy_on_100gr') int energy,
@JsonKey(name: 'proteins_on_100gr') int proteins,
@JsonKey(name: 'fats_on_100gr') int fats,
@JsonKey(name: 'carbohydrates_on_100gr') int carbohydrates});
@JsonKey(name: 'energy_on_100gr') double energy,
@JsonKey(name: 'proteins_on_100gr') double proteins,
@JsonKey(name: 'fats_on_100gr') double fats,
@JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates});
}
/// @nodoc
@@ -85,19 +85,19 @@ class _$ProductModerationModelCopyWithImpl<$Res,
energy: null == energy
? _value.energy
: energy // ignore: cast_nullable_to_non_nullable
as int,
as double,
proteins: null == proteins
? _value.proteins
: proteins // ignore: cast_nullable_to_non_nullable
as int,
as double,
fats: null == fats
? _value.fats
: fats // ignore: cast_nullable_to_non_nullable
as int,
as double,
carbohydrates: null == carbohydrates
? _value.carbohydrates
: carbohydrates // ignore: cast_nullable_to_non_nullable
as int,
as double,
) as $Val);
}
}
@@ -113,10 +113,10 @@ abstract class _$$ProductModerationModelImplCopyWith<$Res>
@useResult
$Res call(
{String name,
@JsonKey(name: 'energy_on_100gr') int energy,
@JsonKey(name: 'proteins_on_100gr') int proteins,
@JsonKey(name: 'fats_on_100gr') int fats,
@JsonKey(name: 'carbohydrates_on_100gr') int carbohydrates});
@JsonKey(name: 'energy_on_100gr') double energy,
@JsonKey(name: 'proteins_on_100gr') double proteins,
@JsonKey(name: 'fats_on_100gr') double fats,
@JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates});
}
/// @nodoc
@@ -148,19 +148,19 @@ class __$$ProductModerationModelImplCopyWithImpl<$Res>
energy: null == energy
? _value.energy
: energy // ignore: cast_nullable_to_non_nullable
as int,
as double,
proteins: null == proteins
? _value.proteins
: proteins // ignore: cast_nullable_to_non_nullable
as int,
as double,
fats: null == fats
? _value.fats
: fats // ignore: cast_nullable_to_non_nullable
as int,
as double,
carbohydrates: null == carbohydrates
? _value.carbohydrates
: carbohydrates // ignore: cast_nullable_to_non_nullable
as int,
as double,
));
}
}
@@ -182,16 +182,16 @@ class _$ProductModerationModelImpl implements _ProductModerationModel {
final String name;
@override
@JsonKey(name: 'energy_on_100gr')
final int energy;
final double energy;
@override
@JsonKey(name: 'proteins_on_100gr')
final int proteins;
final double proteins;
@override
@JsonKey(name: 'fats_on_100gr')
final int fats;
final double fats;
@override
@JsonKey(name: 'carbohydrates_on_100gr')
final int carbohydrates;
final double carbohydrates;
@override
String toString() {
@@ -237,11 +237,11 @@ class _$ProductModerationModelImpl implements _ProductModerationModel {
abstract class _ProductModerationModel implements ProductModerationModel {
const factory _ProductModerationModel(
{required final String name,
@JsonKey(name: 'energy_on_100gr') required final int energy,
@JsonKey(name: 'proteins_on_100gr') required final int proteins,
@JsonKey(name: 'fats_on_100gr') required final int fats,
@JsonKey(name: 'energy_on_100gr') required final double energy,
@JsonKey(name: 'proteins_on_100gr') required final double proteins,
@JsonKey(name: 'fats_on_100gr') required final double fats,
@JsonKey(name: 'carbohydrates_on_100gr')
required final int carbohydrates}) = _$ProductModerationModelImpl;
required final double carbohydrates}) = _$ProductModerationModelImpl;
factory _ProductModerationModel.fromJson(Map<String, dynamic> json) =
_$ProductModerationModelImpl.fromJson;
@@ -250,16 +250,16 @@ abstract class _ProductModerationModel implements ProductModerationModel {
String get name;
@override
@JsonKey(name: 'energy_on_100gr')
int get energy;
double get energy;
@override
@JsonKey(name: 'proteins_on_100gr')
int get proteins;
double get proteins;
@override
@JsonKey(name: 'fats_on_100gr')
int get fats;
double get fats;
@override
@JsonKey(name: 'carbohydrates_on_100gr')
int get carbohydrates;
double get carbohydrates;
/// Create a copy of ProductModerationModel
/// with the given fields replaced by the non-null parameter values.

View File

@@ -10,10 +10,10 @@ _$ProductModerationModelImpl _$$ProductModerationModelImplFromJson(
Map<String, dynamic> json) =>
_$ProductModerationModelImpl(
name: json['name'] as String,
energy: (json['energy_on_100gr'] as num).toInt(),
proteins: (json['proteins_on_100gr'] as num).toInt(),
fats: (json['fats_on_100gr'] as num).toInt(),
carbohydrates: (json['carbohydrates_on_100gr'] as num).toInt(),
energy: (json['energy_on_100gr'] as num).toDouble(),
proteins: (json['proteins_on_100gr'] as num).toDouble(),
fats: (json['fats_on_100gr'] as num).toDouble(),
carbohydrates: (json['carbohydrates_on_100gr'] as num).toDouble(),
);
Map<String, dynamic> _$$ProductModerationModelImplToJson(