forked from eatvio/eatvio_app
feat: consultations
This commit is contained in:
@@ -21,7 +21,9 @@ class FeedConsultantModel with _$FeedConsultantModel {
|
||||
const factory FeedConsultantModel({
|
||||
required String slug,
|
||||
required String name,
|
||||
@JsonKey(name: 'rating_place') required int ratingPlace,
|
||||
@JsonKey(name: 'additional_info') required String description,
|
||||
@JsonKey(name: 'rating_place') int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') required int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') required String photo,
|
||||
required List<BadgeModel> badges,
|
||||
}) = _FeedConsultantModel;
|
||||
|
||||
@@ -258,8 +258,12 @@ FeedConsultantModel _$FeedConsultantModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$FeedConsultantModel {
|
||||
String get slug => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'additional_info')
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'rating_place')
|
||||
int get ratingPlace => throw _privateConstructorUsedError;
|
||||
int? get ratingPlace => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_scores')
|
||||
int get totalScores => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String get photo => throw _privateConstructorUsedError;
|
||||
List<BadgeModel> get badges => throw _privateConstructorUsedError;
|
||||
@@ -283,7 +287,9 @@ abstract class $FeedConsultantModelCopyWith<$Res> {
|
||||
$Res call(
|
||||
{String slug,
|
||||
String name,
|
||||
@JsonKey(name: 'rating_place') int ratingPlace,
|
||||
@JsonKey(name: 'additional_info') String description,
|
||||
@JsonKey(name: 'rating_place') int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') String photo,
|
||||
List<BadgeModel> badges});
|
||||
}
|
||||
@@ -305,7 +311,9 @@ class _$FeedConsultantModelCopyWithImpl<$Res, $Val extends FeedConsultantModel>
|
||||
$Res call({
|
||||
Object? slug = null,
|
||||
Object? name = null,
|
||||
Object? ratingPlace = null,
|
||||
Object? description = null,
|
||||
Object? ratingPlace = freezed,
|
||||
Object? totalScores = null,
|
||||
Object? photo = null,
|
||||
Object? badges = null,
|
||||
}) {
|
||||
@@ -318,9 +326,17 @@ class _$FeedConsultantModelCopyWithImpl<$Res, $Val extends FeedConsultantModel>
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace: null == ratingPlace
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace: freezed == ratingPlace
|
||||
? _value.ratingPlace
|
||||
: ratingPlace // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalScores: null == totalScores
|
||||
? _value.totalScores
|
||||
: totalScores // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
photo: null == photo
|
||||
? _value.photo
|
||||
@@ -345,7 +361,9 @@ abstract class _$$FeedConsultantModelImplCopyWith<$Res>
|
||||
$Res call(
|
||||
{String slug,
|
||||
String name,
|
||||
@JsonKey(name: 'rating_place') int ratingPlace,
|
||||
@JsonKey(name: 'additional_info') String description,
|
||||
@JsonKey(name: 'rating_place') int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') String photo,
|
||||
List<BadgeModel> badges});
|
||||
}
|
||||
@@ -365,7 +383,9 @@ class __$$FeedConsultantModelImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? slug = null,
|
||||
Object? name = null,
|
||||
Object? ratingPlace = null,
|
||||
Object? description = null,
|
||||
Object? ratingPlace = freezed,
|
||||
Object? totalScores = null,
|
||||
Object? photo = null,
|
||||
Object? badges = null,
|
||||
}) {
|
||||
@@ -378,9 +398,17 @@ class __$$FeedConsultantModelImplCopyWithImpl<$Res>
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace: null == ratingPlace
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace: freezed == ratingPlace
|
||||
? _value.ratingPlace
|
||||
: ratingPlace // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalScores: null == totalScores
|
||||
? _value.totalScores
|
||||
: totalScores // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
photo: null == photo
|
||||
? _value.photo
|
||||
@@ -400,7 +428,9 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
|
||||
const _$FeedConsultantModelImpl(
|
||||
{required this.slug,
|
||||
required this.name,
|
||||
@JsonKey(name: 'rating_place') required this.ratingPlace,
|
||||
@JsonKey(name: 'additional_info') required this.description,
|
||||
@JsonKey(name: 'rating_place') this.ratingPlace,
|
||||
@JsonKey(name: 'total_scores') required this.totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') required this.photo,
|
||||
required final List<BadgeModel> badges})
|
||||
: _badges = badges;
|
||||
@@ -413,8 +443,14 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
|
||||
@override
|
||||
final String name;
|
||||
@override
|
||||
@JsonKey(name: 'additional_info')
|
||||
final String description;
|
||||
@override
|
||||
@JsonKey(name: 'rating_place')
|
||||
final int ratingPlace;
|
||||
final int? ratingPlace;
|
||||
@override
|
||||
@JsonKey(name: 'total_scores')
|
||||
final int totalScores;
|
||||
@override
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
final String photo;
|
||||
@@ -428,7 +464,7 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FeedConsultantModel(slug: $slug, name: $name, ratingPlace: $ratingPlace, photo: $photo, badges: $badges)';
|
||||
return 'FeedConsultantModel(slug: $slug, name: $name, description: $description, ratingPlace: $ratingPlace, totalScores: $totalScores, photo: $photo, badges: $badges)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -438,15 +474,26 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
|
||||
other is _$FeedConsultantModelImpl &&
|
||||
(identical(other.slug, slug) || other.slug == slug) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.ratingPlace, ratingPlace) ||
|
||||
other.ratingPlace == ratingPlace) &&
|
||||
(identical(other.totalScores, totalScores) ||
|
||||
other.totalScores == totalScores) &&
|
||||
(identical(other.photo, photo) || other.photo == photo) &&
|
||||
const DeepCollectionEquality().equals(other._badges, _badges));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, slug, name, ratingPlace, photo,
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
slug,
|
||||
name,
|
||||
description,
|
||||
ratingPlace,
|
||||
totalScores,
|
||||
photo,
|
||||
const DeepCollectionEquality().hash(_badges));
|
||||
|
||||
/// Create a copy of FeedConsultantModel
|
||||
@@ -470,7 +517,9 @@ abstract class _FeedConsultantModel implements FeedConsultantModel {
|
||||
const factory _FeedConsultantModel(
|
||||
{required final String slug,
|
||||
required final String name,
|
||||
@JsonKey(name: 'rating_place') required final int ratingPlace,
|
||||
@JsonKey(name: 'additional_info') required final String description,
|
||||
@JsonKey(name: 'rating_place') final int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') required final int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') required final String photo,
|
||||
required final List<BadgeModel> badges}) = _$FeedConsultantModelImpl;
|
||||
|
||||
@@ -482,8 +531,14 @@ abstract class _FeedConsultantModel implements FeedConsultantModel {
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
@JsonKey(name: 'additional_info')
|
||||
String get description;
|
||||
@override
|
||||
@JsonKey(name: 'rating_place')
|
||||
int get ratingPlace;
|
||||
int? get ratingPlace;
|
||||
@override
|
||||
@JsonKey(name: 'total_scores')
|
||||
int get totalScores;
|
||||
@override
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String get photo;
|
||||
|
||||
@@ -30,7 +30,9 @@ _$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson(
|
||||
_$FeedConsultantModelImpl(
|
||||
slug: json['slug'] as String,
|
||||
name: json['name'] as String,
|
||||
ratingPlace: (json['rating_place'] as num).toInt(),
|
||||
description: json['additional_info'] as String,
|
||||
ratingPlace: (json['rating_place'] as num?)?.toInt(),
|
||||
totalScores: (json['total_scores'] as num).toInt(),
|
||||
photo: json['profile_photo_url'] as String,
|
||||
badges: (json['badges'] as List<dynamic>)
|
||||
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
|
||||
@@ -42,7 +44,9 @@ Map<String, dynamic> _$$FeedConsultantModelImplToJson(
|
||||
<String, dynamic>{
|
||||
'slug': instance.slug,
|
||||
'name': instance.name,
|
||||
'additional_info': instance.description,
|
||||
'rating_place': instance.ratingPlace,
|
||||
'total_scores': instance.totalScores,
|
||||
'profile_photo_url': instance.photo,
|
||||
'badges': instance.badges,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user