refactor: remove unused elements

This commit is contained in:
mso7nueh
2024-09-11 16:39:15 +03:00
parent 09cfacb022
commit 69472f422e
182 changed files with 2443 additions and 5482 deletions

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'profile_model.freezed.dart';
part 'profile_model.g.dart';
@freezed

View File

@@ -22,20 +22,28 @@ ProfileModel _$ProfileModelFromJson(Map<String, dynamic> json) {
mixin _$ProfileModel {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "email")
String get email => throw _privateConstructorUsedError;
@JsonKey(name: "email_verified_at")
DateTime? get emailVerifiedAt => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime? get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "is_public_profile")
bool get isPublicProfile => throw _privateConstructorUsedError;
@JsonKey(name: "slug")
String get slug => throw _privateConstructorUsedError;
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl => throw _privateConstructorUsedError;
@@ -45,15 +53,13 @@ mixin _$ProfileModel {
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfileModelCopyWith<ProfileModel> get copyWith =>
throw _privateConstructorUsedError;
$ProfileModelCopyWith<ProfileModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfileModelCopyWith<$Res> {
factory $ProfileModelCopyWith(
ProfileModel value, $Res Function(ProfileModel) then) =
_$ProfileModelCopyWithImpl<$Res, ProfileModel>;
factory $ProfileModelCopyWith(ProfileModel value, $Res Function(ProfileModel) then) = _$ProfileModelCopyWithImpl<$Res, ProfileModel>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -68,12 +74,12 @@ abstract class $ProfileModelCopyWith<$Res> {
}
/// @nodoc
class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
implements $ProfileModelCopyWith<$Res> {
class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel> implements $ProfileModelCopyWith<$Res> {
_$ProfileModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -134,11 +140,9 @@ class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
}
/// @nodoc
abstract class _$$ProfileModelImplCopyWith<$Res>
implements $ProfileModelCopyWith<$Res> {
factory _$$ProfileModelImplCopyWith(
_$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) =
__$$ProfileModelImplCopyWithImpl<$Res>;
abstract class _$$ProfileModelImplCopyWith<$Res> implements $ProfileModelCopyWith<$Res> {
factory _$$ProfileModelImplCopyWith(_$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) = __$$ProfileModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -154,12 +158,8 @@ abstract class _$$ProfileModelImplCopyWith<$Res>
}
/// @nodoc
class __$$ProfileModelImplCopyWithImpl<$Res>
extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl>
implements _$$ProfileModelImplCopyWith<$Res> {
__$$ProfileModelImplCopyWithImpl(
_$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then)
: super(_value, _then);
class __$$ProfileModelImplCopyWithImpl<$Res> extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl> implements _$$ProfileModelImplCopyWith<$Res> {
__$$ProfileModelImplCopyWithImpl(_$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then) : super(_value, _then);
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.
@@ -231,8 +231,7 @@ class _$ProfileModelImpl implements _ProfileModel {
@JsonKey(name: "slug") required this.slug,
@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl});
factory _$ProfileModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ProfileModelImplFromJson(json);
factory _$ProfileModelImpl.fromJson(Map<String, dynamic> json) => _$$ProfileModelImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -275,31 +274,24 @@ class _$ProfileModelImpl implements _ProfileModel {
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.email, email) || other.email == email) &&
(identical(other.emailVerifiedAt, emailVerifiedAt) ||
other.emailVerifiedAt == emailVerifiedAt) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.isPublicProfile, isPublicProfile) ||
other.isPublicProfile == isPublicProfile) &&
(identical(other.emailVerifiedAt, emailVerifiedAt) || other.emailVerifiedAt == emailVerifiedAt) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
(identical(other.isPublicProfile, isPublicProfile) || other.isPublicProfile == isPublicProfile) &&
(identical(other.slug, slug) || other.slug == slug) &&
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
other.profilePhotoUrl == profilePhotoUrl));
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, name, email, emailVerifiedAt,
createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl);
int get hashCode => Object.hash(runtimeType, id, name, email, emailVerifiedAt, createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl);
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith =>
__$$ProfileModelImplCopyWithImpl<_$ProfileModelImpl>(this, _$identity);
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith => __$$ProfileModelImplCopyWithImpl<_$ProfileModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -319,36 +311,42 @@ abstract class _ProfileModel implements ProfileModel {
@JsonKey(name: "updated_at") final DateTime? updatedAt,
@JsonKey(name: "is_public_profile") required final bool isPublicProfile,
@JsonKey(name: "slug") required final String slug,
@JsonKey(name: "profile_photo_url")
required final String profilePhotoUrl}) = _$ProfileModelImpl;
@JsonKey(name: "profile_photo_url") required final String profilePhotoUrl}) = _$ProfileModelImpl;
factory _ProfileModel.fromJson(Map<String, dynamic> json) =
_$ProfileModelImpl.fromJson;
factory _ProfileModel.fromJson(Map<String, dynamic> json) = _$ProfileModelImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "email")
String get email;
@override
@JsonKey(name: "email_verified_at")
DateTime? get emailVerifiedAt;
@override
@JsonKey(name: "created_at")
DateTime? get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime? get updatedAt;
@override
@JsonKey(name: "is_public_profile")
bool get isPublicProfile;
@override
@JsonKey(name: "slug")
String get slug;
@override
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl;
@@ -357,8 +355,7 @@ abstract class _ProfileModel implements ProfileModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith => throw _privateConstructorUsedError;
}
ProfileDetailsModel _$ProfileDetailsModelFromJson(Map<String, dynamic> json) {
@@ -369,56 +366,82 @@ ProfileDetailsModel _$ProfileDetailsModelFromJson(Map<String, dynamic> json) {
mixin _$ProfileDetailsModel {
@JsonKey(name: "first_name")
String get firstName => throw _privateConstructorUsedError;
@JsonKey(name: "last_name")
String get lastName => throw _privateConstructorUsedError;
@JsonKey(name: "birthdate")
String get birthdate => throw _privateConstructorUsedError;
@JsonKey(name: "gender")
String get gender => throw _privateConstructorUsedError;
@JsonKey(name: "country")
String get country => throw _privateConstructorUsedError;
@JsonKey(name: "city")
String get city => throw _privateConstructorUsedError;
@JsonKey(name: "lang")
String get lang => throw _privateConstructorUsedError;
@JsonKey(name: "weight")
double get weight => throw _privateConstructorUsedError;
@JsonKey(name: "height")
int get height => throw _privateConstructorUsedError;
@JsonKey(name: "chest_circumference")
int get chestCircumference => throw _privateConstructorUsedError;
@JsonKey(name: "waist_circumference")
int get waistCircumference => throw _privateConstructorUsedError;
@JsonKey(name: "hip_circumference")
int get hipCircumference => throw _privateConstructorUsedError;
@JsonKey(name: "blood_pressure_up")
int get bloodPressureUp => throw _privateConstructorUsedError;
@JsonKey(name: "blood_pressure_down")
int get bloodPressureDown => throw _privateConstructorUsedError;
@JsonKey(name: "has_hypo")
bool get hasHypo => throw _privateConstructorUsedError;
@JsonKey(name: "has_hyper")
bool get hasHyper => throw _privateConstructorUsedError;
@JsonKey(name: "about_alergy")
String get aboutAlergy => throw _privateConstructorUsedError;
@JsonKey(name: "about_taking_pils")
String get aboutTakingPils => throw _privateConstructorUsedError;
@JsonKey(name: "about_sport_hobbies")
String get aboutSportHobbies => throw _privateConstructorUsedError;
@JsonKey(name: "favorite_foods")
String get favoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: "unfavorite_foods")
String get unfavoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: "additional_info")
String get additionalInfo => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime? get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "is_mood_fillable")
bool get isMoodFillable => throw _privateConstructorUsedError;
@JsonKey(name: "is_bedtime_fillable")
bool get isBedtimeFillable => throw _privateConstructorUsedError;
@JsonKey(name: "activity_coefficient")
double get activityCoefficient => throw _privateConstructorUsedError;
@@ -428,15 +451,14 @@ mixin _$ProfileDetailsModel {
/// Create a copy of ProfileDetailsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfileDetailsModelCopyWith<ProfileDetailsModel> get copyWith =>
throw _privateConstructorUsedError;
$ProfileDetailsModelCopyWith<ProfileDetailsModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfileDetailsModelCopyWith<$Res> {
factory $ProfileDetailsModelCopyWith(
ProfileDetailsModel value, $Res Function(ProfileDetailsModel) then) =
factory $ProfileDetailsModelCopyWith(ProfileDetailsModel value, $Res Function(ProfileDetailsModel) then) =
_$ProfileDetailsModelCopyWithImpl<$Res, ProfileDetailsModel>;
@useResult
$Res call(
{@JsonKey(name: "first_name") String firstName,
@@ -469,12 +491,12 @@ abstract class $ProfileDetailsModelCopyWith<$Res> {
}
/// @nodoc
class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel>
implements $ProfileDetailsModelCopyWith<$Res> {
class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel> implements $ProfileDetailsModelCopyWith<$Res> {
_$ProfileDetailsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -625,11 +647,10 @@ class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel>
}
/// @nodoc
abstract class _$$ProfileDetailsModelImplCopyWith<$Res>
implements $ProfileDetailsModelCopyWith<$Res> {
factory _$$ProfileDetailsModelImplCopyWith(_$ProfileDetailsModelImpl value,
$Res Function(_$ProfileDetailsModelImpl) then) =
abstract class _$$ProfileDetailsModelImplCopyWith<$Res> implements $ProfileDetailsModelCopyWith<$Res> {
factory _$$ProfileDetailsModelImplCopyWith(_$ProfileDetailsModelImpl value, $Res Function(_$ProfileDetailsModelImpl) then) =
__$$ProfileDetailsModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -663,12 +684,9 @@ abstract class _$$ProfileDetailsModelImplCopyWith<$Res>
}
/// @nodoc
class __$$ProfileDetailsModelImplCopyWithImpl<$Res>
extends _$ProfileDetailsModelCopyWithImpl<$Res, _$ProfileDetailsModelImpl>
class __$$ProfileDetailsModelImplCopyWithImpl<$Res> extends _$ProfileDetailsModelCopyWithImpl<$Res, _$ProfileDetailsModelImpl>
implements _$$ProfileDetailsModelImplCopyWith<$Res> {
__$$ProfileDetailsModelImplCopyWithImpl(_$ProfileDetailsModelImpl _value,
$Res Function(_$ProfileDetailsModelImpl) _then)
: super(_value, _then);
__$$ProfileDetailsModelImplCopyWithImpl(_$ProfileDetailsModelImpl _value, $Res Function(_$ProfileDetailsModelImpl) _then) : super(_value, _then);
/// Create a copy of ProfileDetailsModel
/// with the given fields replaced by the non-null parameter values.
@@ -846,11 +864,9 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
@JsonKey(name: "updated_at") this.updatedAt,
@JsonKey(name: "is_mood_fillable") required this.isMoodFillable,
@JsonKey(name: "is_bedtime_fillable") required this.isBedtimeFillable,
@JsonKey(name: "activity_coefficient")
required this.activityCoefficient});
@JsonKey(name: "activity_coefficient") required this.activityCoefficient});
factory _$ProfileDetailsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ProfileDetailsModelImplFromJson(json);
factory _$ProfileDetailsModelImpl.fromJson(Map<String, dynamic> json) => _$$ProfileDetailsModelImplFromJson(json);
@override
@JsonKey(name: "first_name")
@@ -944,53 +960,33 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileDetailsModelImpl &&
(identical(other.firstName, firstName) ||
other.firstName == firstName) &&
(identical(other.lastName, lastName) ||
other.lastName == lastName) &&
(identical(other.birthdate, birthdate) ||
other.birthdate == birthdate) &&
(identical(other.firstName, firstName) || other.firstName == firstName) &&
(identical(other.lastName, lastName) || other.lastName == lastName) &&
(identical(other.birthdate, birthdate) || other.birthdate == birthdate) &&
(identical(other.gender, gender) || other.gender == gender) &&
(identical(other.country, country) || other.country == country) &&
(identical(other.city, city) || other.city == city) &&
(identical(other.lang, lang) || other.lang == lang) &&
(identical(other.weight, weight) || other.weight == weight) &&
(identical(other.height, height) || other.height == height) &&
(identical(other.chestCircumference, chestCircumference) ||
other.chestCircumference == chestCircumference) &&
(identical(other.waistCircumference, waistCircumference) ||
other.waistCircumference == waistCircumference) &&
(identical(other.hipCircumference, hipCircumference) ||
other.hipCircumference == hipCircumference) &&
(identical(other.bloodPressureUp, bloodPressureUp) ||
other.bloodPressureUp == bloodPressureUp) &&
(identical(other.bloodPressureDown, bloodPressureDown) ||
other.bloodPressureDown == bloodPressureDown) &&
(identical(other.chestCircumference, chestCircumference) || other.chestCircumference == chestCircumference) &&
(identical(other.waistCircumference, waistCircumference) || other.waistCircumference == waistCircumference) &&
(identical(other.hipCircumference, hipCircumference) || other.hipCircumference == hipCircumference) &&
(identical(other.bloodPressureUp, bloodPressureUp) || other.bloodPressureUp == bloodPressureUp) &&
(identical(other.bloodPressureDown, bloodPressureDown) || other.bloodPressureDown == bloodPressureDown) &&
(identical(other.hasHypo, hasHypo) || other.hasHypo == hasHypo) &&
(identical(other.hasHyper, hasHyper) ||
other.hasHyper == hasHyper) &&
(identical(other.aboutAlergy, aboutAlergy) ||
other.aboutAlergy == aboutAlergy) &&
(identical(other.aboutTakingPils, aboutTakingPils) ||
other.aboutTakingPils == aboutTakingPils) &&
(identical(other.aboutSportHobbies, aboutSportHobbies) ||
other.aboutSportHobbies == aboutSportHobbies) &&
(identical(other.favoriteFoods, favoriteFoods) ||
other.favoriteFoods == favoriteFoods) &&
(identical(other.unfavoriteFoods, unfavoriteFoods) ||
other.unfavoriteFoods == unfavoriteFoods) &&
(identical(other.additionalInfo, additionalInfo) ||
other.additionalInfo == additionalInfo) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.isMoodFillable, isMoodFillable) ||
other.isMoodFillable == isMoodFillable) &&
(identical(other.isBedtimeFillable, isBedtimeFillable) ||
other.isBedtimeFillable == isBedtimeFillable) &&
(identical(other.activityCoefficient, activityCoefficient) ||
other.activityCoefficient == activityCoefficient));
(identical(other.hasHyper, hasHyper) || other.hasHyper == hasHyper) &&
(identical(other.aboutAlergy, aboutAlergy) || other.aboutAlergy == aboutAlergy) &&
(identical(other.aboutTakingPils, aboutTakingPils) || other.aboutTakingPils == aboutTakingPils) &&
(identical(other.aboutSportHobbies, aboutSportHobbies) || other.aboutSportHobbies == aboutSportHobbies) &&
(identical(other.favoriteFoods, favoriteFoods) || other.favoriteFoods == favoriteFoods) &&
(identical(other.unfavoriteFoods, unfavoriteFoods) || other.unfavoriteFoods == unfavoriteFoods) &&
(identical(other.additionalInfo, additionalInfo) || other.additionalInfo == additionalInfo) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
(identical(other.isMoodFillable, isMoodFillable) || other.isMoodFillable == isMoodFillable) &&
(identical(other.isBedtimeFillable, isBedtimeFillable) || other.isBedtimeFillable == isBedtimeFillable) &&
(identical(other.activityCoefficient, activityCoefficient) || other.activityCoefficient == activityCoefficient));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -1032,8 +1028,7 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
@override
@pragma('vm:prefer-inline')
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith =>
__$$ProfileDetailsModelImplCopyWithImpl<_$ProfileDetailsModelImpl>(
this, _$identity);
__$$ProfileDetailsModelImplCopyWithImpl<_$ProfileDetailsModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -1054,112 +1049,131 @@ abstract class _ProfileDetailsModel implements ProfileDetailsModel {
@JsonKey(name: "lang") required final String lang,
@JsonKey(name: "weight") required final double weight,
@JsonKey(name: "height") required final int height,
@JsonKey(name: "chest_circumference")
required final int chestCircumference,
@JsonKey(name: "waist_circumference")
required final int waistCircumference,
@JsonKey(name: "chest_circumference") required final int chestCircumference,
@JsonKey(name: "waist_circumference") required final int waistCircumference,
@JsonKey(name: "hip_circumference") required final int hipCircumference,
@JsonKey(name: "blood_pressure_up") required final int bloodPressureUp,
@JsonKey(name: "blood_pressure_down")
required final int bloodPressureDown,
@JsonKey(name: "blood_pressure_down") required final int bloodPressureDown,
@JsonKey(name: "has_hypo") required final bool hasHypo,
@JsonKey(name: "has_hyper") required final bool hasHyper,
@JsonKey(name: "about_alergy") required final String aboutAlergy,
@JsonKey(name: "about_taking_pils") required final String aboutTakingPils,
@JsonKey(name: "about_sport_hobbies")
required final String aboutSportHobbies,
@JsonKey(name: "about_sport_hobbies") required final String aboutSportHobbies,
@JsonKey(name: "favorite_foods") required final String favoriteFoods,
@JsonKey(name: "unfavorite_foods") required final String unfavoriteFoods,
@JsonKey(name: "additional_info") required final String additionalInfo,
@JsonKey(name: "created_at") final DateTime? createdAt,
@JsonKey(name: "updated_at") final DateTime? updatedAt,
@JsonKey(name: "is_mood_fillable") required final bool isMoodFillable,
@JsonKey(name: "is_bedtime_fillable")
required final bool isBedtimeFillable,
@JsonKey(name: "activity_coefficient")
required final double activityCoefficient}) = _$ProfileDetailsModelImpl;
@JsonKey(name: "is_bedtime_fillable") required final bool isBedtimeFillable,
@JsonKey(name: "activity_coefficient") required final double activityCoefficient}) = _$ProfileDetailsModelImpl;
factory _ProfileDetailsModel.fromJson(Map<String, dynamic> json) =
_$ProfileDetailsModelImpl.fromJson;
factory _ProfileDetailsModel.fromJson(Map<String, dynamic> json) = _$ProfileDetailsModelImpl.fromJson;
@override
@JsonKey(name: "first_name")
String get firstName;
@override
@JsonKey(name: "last_name")
String get lastName;
@override
@JsonKey(name: "birthdate")
String get birthdate;
@override
@JsonKey(name: "gender")
String get gender;
@override
@JsonKey(name: "country")
String get country;
@override
@JsonKey(name: "city")
String get city;
@override
@JsonKey(name: "lang")
String get lang;
@override
@JsonKey(name: "weight")
double get weight;
@override
@JsonKey(name: "height")
int get height;
@override
@JsonKey(name: "chest_circumference")
int get chestCircumference;
@override
@JsonKey(name: "waist_circumference")
int get waistCircumference;
@override
@JsonKey(name: "hip_circumference")
int get hipCircumference;
@override
@JsonKey(name: "blood_pressure_up")
int get bloodPressureUp;
@override
@JsonKey(name: "blood_pressure_down")
int get bloodPressureDown;
@override
@JsonKey(name: "has_hypo")
bool get hasHypo;
@override
@JsonKey(name: "has_hyper")
bool get hasHyper;
@override
@JsonKey(name: "about_alergy")
String get aboutAlergy;
@override
@JsonKey(name: "about_taking_pils")
String get aboutTakingPils;
@override
@JsonKey(name: "about_sport_hobbies")
String get aboutSportHobbies;
@override
@JsonKey(name: "favorite_foods")
String get favoriteFoods;
@override
@JsonKey(name: "unfavorite_foods")
String get unfavoriteFoods;
@override
@JsonKey(name: "additional_info")
String get additionalInfo;
@override
@JsonKey(name: "created_at")
DateTime? get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime? get updatedAt;
@override
@JsonKey(name: "is_mood_fillable")
bool get isMoodFillable;
@override
@JsonKey(name: "is_bedtime_fillable")
bool get isBedtimeFillable;
@override
@JsonKey(name: "activity_coefficient")
double get activityCoefficient;
@@ -1168,6 +1182,5 @@ abstract class _ProfileDetailsModel implements ProfileDetailsModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,27 +6,19 @@ part of 'profile_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
_$ProfileModelImpl(
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) => _$ProfileModelImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
email: json['email'] as String,
emailVerifiedAt: json['email_verified_at'] == null
? null
: DateTime.parse(json['email_verified_at'] as String),
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
emailVerifiedAt: json['email_verified_at'] == null ? null : DateTime.parse(json['email_verified_at'] as String),
createdAt: json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String),
isPublicProfile: json['is_public_profile'] as bool,
slug: json['slug'] as String,
profilePhotoUrl: json['profile_photo_url'] as String,
);
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'email': instance.email,
@@ -38,9 +30,7 @@ Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
'profile_photo_url': instance.profilePhotoUrl,
};
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
Map<String, dynamic> json) =>
_$ProfileDetailsModelImpl(
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(Map<String, dynamic> json) => _$ProfileDetailsModelImpl(
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
birthdate: json['birthdate'] as String,
@@ -63,20 +53,14 @@ _$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
favoriteFoods: json['favorite_foods'] as String,
unfavoriteFoods: json['unfavorite_foods'] as String,
additionalInfo: json['additional_info'] as String,
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
createdAt: json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String),
isMoodFillable: json['is_mood_fillable'] as bool,
isBedtimeFillable: json['is_bedtime_fillable'] as bool,
activityCoefficient: (json['activity_coefficient'] as num).toDouble(),
);
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(
_$ProfileDetailsModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(_$ProfileDetailsModelImpl instance) => <String, dynamic>{
'first_name': instance.firstName,
'last_name': instance.lastName,
'birthdate': instance.birthdate,

View File

@@ -20,21 +20,16 @@ mixin _$ProfileState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) =>
throw _privateConstructorUsedError;
@@ -42,9 +37,7 @@ mixin _$ProfileState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) =>
@@ -78,18 +71,16 @@ mixin _$ProfileState {
/// @nodoc
abstract class $ProfileStateCopyWith<$Res> {
factory $ProfileStateCopyWith(
ProfileState value, $Res Function(ProfileState) then) =
_$ProfileStateCopyWithImpl<$Res, ProfileState>;
factory $ProfileStateCopyWith(ProfileState value, $Res Function(ProfileState) then) = _$ProfileStateCopyWithImpl<$Res, ProfileState>;
}
/// @nodoc
class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
implements $ProfileStateCopyWith<$Res> {
class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState> implements $ProfileStateCopyWith<$Res> {
_$ProfileStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -99,18 +90,12 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
/// @nodoc
abstract class _$$ProfileStateImplCopyWith<$Res> {
factory _$$ProfileStateImplCopyWith(
_$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) =
__$$ProfileStateImplCopyWithImpl<$Res>;
factory _$$ProfileStateImplCopyWith(_$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) = __$$ProfileStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileStateImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl>
implements _$$ProfileStateImplCopyWith<$Res> {
__$$ProfileStateImplCopyWithImpl(
_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then)
: super(_value, _then);
class __$$ProfileStateImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl> implements _$$ProfileStateImplCopyWith<$Res> {
__$$ProfileStateImplCopyWithImpl(_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -128,8 +113,7 @@ class _$ProfileStateImpl implements _ProfileState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$ProfileStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileStateImpl);
}
@override
@@ -140,11 +124,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return $default();
@@ -155,9 +135,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return $default?.call();
@@ -168,9 +146,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -224,18 +200,14 @@ abstract class _ProfileState implements ProfileState {
/// @nodoc
abstract class _$$ProfileStateLoadingImplCopyWith<$Res> {
factory _$$ProfileStateLoadingImplCopyWith(_$ProfileStateLoadingImpl value,
$Res Function(_$ProfileStateLoadingImpl) then) =
factory _$$ProfileStateLoadingImplCopyWith(_$ProfileStateLoadingImpl value, $Res Function(_$ProfileStateLoadingImpl) then) =
__$$ProfileStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileStateLoadingImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadingImpl>
class __$$ProfileStateLoadingImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadingImpl>
implements _$$ProfileStateLoadingImplCopyWith<$Res> {
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value,
$Res Function(_$ProfileStateLoadingImpl) _then)
: super(_value, _then);
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value, $Res Function(_$ProfileStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -253,9 +225,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileStateLoadingImpl);
}
@override
@@ -266,11 +236,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return loading();
@@ -281,9 +247,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loading?.call();
@@ -294,9 +258,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -350,26 +312,21 @@ abstract class ProfileStateLoading implements ProfileState {
/// @nodoc
abstract class _$$ProfileStateLoadedImplCopyWith<$Res> {
factory _$$ProfileStateLoadedImplCopyWith(_$ProfileStateLoadedImpl value,
$Res Function(_$ProfileStateLoadedImpl) then) =
factory _$$ProfileStateLoadedImplCopyWith(_$ProfileStateLoadedImpl value, $Res Function(_$ProfileStateLoadedImpl) then) =
__$$ProfileStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call(
{ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts});
$Res call({ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts});
$ProfileModelCopyWith<$Res> get profile;
$ProfileDetailsModelCopyWith<$Res> get profileDetails;
}
/// @nodoc
class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadedImpl>
class __$$ProfileStateLoadedImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadedImpl>
implements _$$ProfileStateLoadedImplCopyWith<$Res> {
__$$ProfileStateLoadedImplCopyWithImpl(_$ProfileStateLoadedImpl _value,
$Res Function(_$ProfileStateLoadedImpl) _then)
: super(_value, _then);
__$$ProfileStateLoadedImplCopyWithImpl(_$ProfileStateLoadedImpl _value, $Res Function(_$ProfileStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -420,10 +377,7 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
const _$ProfileStateLoadedImpl(
{required this.profile,
required this.profileDetails,
required final List<FeedBlogPostModel> blogPosts})
const _$ProfileStateLoadedImpl({required this.profile, required this.profileDetails, required final List<FeedBlogPostModel> blogPosts})
: _blogPosts = blogPosts;
@override
@@ -431,6 +385,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
@override
final ProfileDetailsModel profileDetails;
final List<FeedBlogPostModel> _blogPosts;
@override
List<FeedBlogPostModel> get blogPosts {
if (_blogPosts is EqualUnmodifiableListView) return _blogPosts;
@@ -449,15 +404,12 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
(other.runtimeType == runtimeType &&
other is _$ProfileStateLoadedImpl &&
(identical(other.profile, profile) || other.profile == profile) &&
(identical(other.profileDetails, profileDetails) ||
other.profileDetails == profileDetails) &&
const DeepCollectionEquality()
.equals(other._blogPosts, _blogPosts));
(identical(other.profileDetails, profileDetails) || other.profileDetails == profileDetails) &&
const DeepCollectionEquality().equals(other._blogPosts, _blogPosts));
}
@override
int get hashCode => Object.hash(runtimeType, profile, profileDetails,
const DeepCollectionEquality().hash(_blogPosts));
int get hashCode => Object.hash(runtimeType, profile, profileDetails, const DeepCollectionEquality().hash(_blogPosts));
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -465,19 +417,14 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
__$$ProfileStateLoadedImplCopyWithImpl<_$ProfileStateLoadedImpl>(
this, _$identity);
__$$ProfileStateLoadedImplCopyWithImpl<_$ProfileStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return loaded(profile, profileDetails, blogPosts);
@@ -488,9 +435,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loaded?.call(profile, profileDetails, blogPosts);
@@ -501,9 +446,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -553,38 +496,35 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
abstract class ProfileStateLoaded implements ProfileState {
const factory ProfileStateLoaded(
{required final ProfileModel profile,
required final ProfileDetailsModel profileDetails,
required final List<FeedBlogPostModel> blogPosts}) =
_$ProfileStateLoadedImpl;
{required final ProfileModel profile,
required final ProfileDetailsModel profileDetails,
required final List<FeedBlogPostModel> blogPosts}) = _$ProfileStateLoadedImpl;
ProfileModel get profile;
ProfileDetailsModel get profileDetails;
List<FeedBlogPostModel> get blogPosts;
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ProfileStateErrorImplCopyWith<$Res> {
factory _$$ProfileStateErrorImplCopyWith(_$ProfileStateErrorImpl value,
$Res Function(_$ProfileStateErrorImpl) then) =
factory _$$ProfileStateErrorImplCopyWith(_$ProfileStateErrorImpl value, $Res Function(_$ProfileStateErrorImpl) then) =
__$$ProfileStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$ProfileStateErrorImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateErrorImpl>
class __$$ProfileStateErrorImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateErrorImpl>
implements _$$ProfileStateErrorImplCopyWith<$Res> {
__$$ProfileStateErrorImplCopyWithImpl(_$ProfileStateErrorImpl _value,
$Res Function(_$ProfileStateErrorImpl) _then)
: super(_value, _then);
__$$ProfileStateErrorImplCopyWithImpl(_$ProfileStateErrorImpl _value, $Res Function(_$ProfileStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -620,8 +560,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -632,20 +571,14 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
__$$ProfileStateErrorImplCopyWithImpl<_$ProfileStateErrorImpl>(
this, _$identity);
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith => __$$ProfileStateErrorImplCopyWithImpl<_$ProfileStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return error(errorMessage);
@@ -656,9 +589,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return error?.call(errorMessage);
@@ -669,9 +600,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -720,14 +649,12 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
}
abstract class ProfileStateError implements ProfileState {
const factory ProfileStateError({required final String errorMessage}) =
_$ProfileStateErrorImpl;
const factory ProfileStateError({required final String errorMessage}) = _$ProfileStateErrorImpl;
String get errorMessage;
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,4 +1,4 @@
//
//
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
// import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
// import 'package:flutter/cupertino.dart';

View File

@@ -1,4 +1,4 @@
//
//
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
// import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
// import 'package:flutter/cupertino.dart';

View File

@@ -191,8 +191,7 @@ class _ProfileService implements ProfileService {
}
@override
Future<FeedBlogPostSettingsModel> getBlogPostByAuthorSlug(
{required String slug}) async {
Future<FeedBlogPostSettingsModel> getBlogPostByAuthorSlug({required String slug}) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
@@ -225,9 +224,7 @@ class _ProfileService implements ProfileService {
}
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
if (T != dynamic &&
!(requestOptions.responseType == ResponseType.bytes ||
requestOptions.responseType == ResponseType.stream)) {
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
if (T == String) {
requestOptions.responseType = ResponseType.plain;
} else {