feature(registration): remove .env

This commit is contained in:
mso7nueh
2024-07-15 17:06:13 +03:00
parent 726b74a236
commit d859a15cfd
188 changed files with 2509 additions and 3147 deletions

View File

@@ -34,15 +34,12 @@ mixin _$FeedBlogPostModel {
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
throw _privateConstructorUsedError;
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $FeedBlogPostModelCopyWith<$Res> {
factory $FeedBlogPostModelCopyWith(
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
factory $FeedBlogPostModelCopyWith(FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
@useResult
$Res call(
{int id,
@@ -56,8 +53,7 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
}
/// @nodoc
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
implements $FeedBlogPostModelCopyWith<$Res> {
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> implements $FeedBlogPostModelCopyWith<$Res> {
_$FeedBlogPostModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
@@ -115,10 +111,8 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
}
/// @nodoc
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
implements $FeedBlogPostModelCopyWith<$Res> {
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
$Res Function(_$FeedBlogPostModelImpl) then) =
abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostModelCopyWith<$Res> {
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value, $Res Function(_$FeedBlogPostModelImpl) then) =
__$$FeedBlogPostModelImplCopyWithImpl<$Res>;
@override
@useResult
@@ -134,12 +128,9 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
}
/// @nodoc
class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
class __$$FeedBlogPostModelImplCopyWithImpl<$Res> extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
implements _$$FeedBlogPostModelImplCopyWith<$Res> {
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value,
$Res Function(_$FeedBlogPostModelImpl) _then)
: super(_value, _then);
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value, $Res Function(_$FeedBlogPostModelImpl) _then) : super(_value, _then);
@pragma('vm:prefer-inline')
@override
@@ -203,8 +194,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
@JsonKey(name: "updated_at") required this.updatedAt,
required this.title});
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostModelImplFromJson(json);
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostModelImplFromJson(json);
@override
final int id;
@@ -239,28 +229,21 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
(identical(other.id, id) || other.id == id) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.youtubeUrl, youtubeUrl) ||
other.youtubeUrl == youtubeUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.description, description) || other.description == description) &&
(identical(other.youtubeUrl, youtubeUrl) || other.youtubeUrl == youtubeUrl) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, state, image, description,
youtubeUrl, createdAt, updatedAt, title);
int get hashCode => Object.hash(runtimeType, id, state, image, description, youtubeUrl, createdAt, updatedAt, title);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
this, _$identity);
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => __$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -281,8 +264,7 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
@JsonKey(name: "updated_at") required final DateTime updatedAt,
required final String title}) = _$FeedBlogPostModelImpl;
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostModelImpl.fromJson;
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostModelImpl.fromJson;
@override
int get id;
@@ -305,6 +287,5 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
String get title;
@override
@JsonKey(ignore: true)
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,9 +6,7 @@ part of 'feed_blog_post_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
Map<String, dynamic> json) =>
_$FeedBlogPostModelImpl(
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostModelImpl(
id: (json['id'] as num).toInt(),
state: json['state'] as String,
image: json['image'] as String,
@@ -19,9 +17,7 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
title: json['title'] as String,
);
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
_$FeedBlogPostModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(_$FeedBlogPostModelImpl instance) => <String, dynamic>{
'id': instance.id,
'state': instance.state,
'image': instance.image,

View File

@@ -7,8 +7,7 @@ part 'feed_blog_post_settings_model.g.dart';
@freezed
class FeedBlogPostSettingsModel with _$FeedBlogPostSettingsModel {
const factory FeedBlogPostSettingsModel({
@JsonKey(name: 'data')
required List<FeedBlogPostModel> feedBlogPostList,
@JsonKey(name: 'data') required List<FeedBlogPostModel> feedBlogPostList,
}) = _FeedBlogPostSettingsModel;
factory FeedBlogPostSettingsModel.fromJson(Map<String, Object?> json) => _$FeedBlogPostSettingsModelFromJson(json);

View File

@@ -14,36 +14,30 @@ T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
Map<String, dynamic> json) {
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(Map<String, dynamic> json) {
return _FeedBlogPostSettingsModel.fromJson(json);
}
/// @nodoc
mixin _$FeedBlogPostSettingsModel {
@JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList =>
throw _privateConstructorUsedError;
List<FeedBlogPostModel> get feedBlogPostList => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
throw _privateConstructorUsedError;
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value,
$Res Function(FeedBlogPostSettingsModel) then) =
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value, $Res Function(FeedBlogPostSettingsModel) then) =
_$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
@useResult
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList});
}
/// @nodoc
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
$Val extends FeedBlogPostSettingsModel>
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSettingsModel> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
@@ -66,11 +60,8 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
}
/// @nodoc
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
factory _$$FeedBlogPostSettingsModelImplCopyWith(
_$FeedBlogPostSettingsModelImpl value,
$Res Function(_$FeedBlogPostSettingsModelImpl) then) =
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
factory _$$FeedBlogPostSettingsModelImplCopyWith(_$FeedBlogPostSettingsModelImpl value, $Res Function(_$FeedBlogPostSettingsModelImpl) then) =
__$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
@override
@useResult
@@ -78,13 +69,9 @@ abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
}
/// @nodoc
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
_$FeedBlogPostSettingsModelImpl>
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res, _$FeedBlogPostSettingsModelImpl>
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
__$$FeedBlogPostSettingsModelImplCopyWithImpl(
_$FeedBlogPostSettingsModelImpl _value,
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
__$$FeedBlogPostSettingsModelImplCopyWithImpl(_$FeedBlogPostSettingsModelImpl _value, $Res Function(_$FeedBlogPostSettingsModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@@ -104,20 +91,16 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
const _$FeedBlogPostSettingsModelImpl(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList})
const _$FeedBlogPostSettingsModelImpl({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList})
: _feedBlogPostList = feedBlogPostList;
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostSettingsModelImplFromJson(json);
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostSettingsModelImplFromJson(json);
final List<FeedBlogPostModel> _feedBlogPostList;
@override
@JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList {
if (_feedBlogPostList is EqualUnmodifiableListView)
return _feedBlogPostList;
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_feedBlogPostList);
}
@@ -132,21 +115,18 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FeedBlogPostSettingsModelImpl &&
const DeepCollectionEquality()
.equals(other._feedBlogPostList, _feedBlogPostList));
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith =>
__$$FeedBlogPostSettingsModelImplCopyWithImpl<_$FeedBlogPostSettingsModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -157,19 +137,14 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
}
abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
const factory _FeedBlogPostSettingsModel(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList}) =
_$FeedBlogPostSettingsModelImpl;
const factory _FeedBlogPostSettingsModel({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList}) = _$FeedBlogPostSettingsModelImpl;
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostSettingsModelImpl.fromJson;
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostSettingsModelImpl.fromJson;
@override
@JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList;
@override
@JsonKey(ignore: true)
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,16 +6,10 @@ part of 'feed_blog_post_settings_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
Map<String, dynamic> json) =>
_$FeedBlogPostSettingsModelImpl(
feedBlogPostList: (json['data'] as List<dynamic>)
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
.toList(),
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostSettingsModelImpl(
feedBlogPostList: (json['data'] as List<dynamic>).map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>)).toList(),
);
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
_$FeedBlogPostSettingsModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(_$FeedBlogPostSettingsModelImpl instance) => <String, dynamic>{
'data': instance.feedBlogPostList,
};

View File

@@ -70,13 +70,11 @@ mixin _$FeedState {
/// @nodoc
abstract class $FeedStateCopyWith<$Res> {
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) =
_$FeedStateCopyWithImpl<$Res, FeedState>;
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) = _$FeedStateCopyWithImpl<$Res, FeedState>;
}
/// @nodoc
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
implements $FeedStateCopyWith<$Res> {
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStateCopyWith<$Res> {
_$FeedStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
@@ -87,18 +85,12 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
/// @nodoc
abstract class _$$FeedStateImplCopyWith<$Res> {
factory _$$FeedStateImplCopyWith(
_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) =
__$$FeedStateImplCopyWithImpl<$Res>;
factory _$$FeedStateImplCopyWith(_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) = __$$FeedStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$FeedStateImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl>
implements _$$FeedStateImplCopyWith<$Res> {
__$$FeedStateImplCopyWithImpl(
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
: super(_value, _then);
class __$$FeedStateImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl> implements _$$FeedStateImplCopyWith<$Res> {
__$$FeedStateImplCopyWithImpl(_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then) : super(_value, _then);
}
/// @nodoc
@@ -113,8 +105,7 @@ class _$FeedStateImpl implements _FeedState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$FeedStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateImpl);
}
@override
@@ -201,18 +192,14 @@ abstract class _FeedState implements FeedState {
/// @nodoc
abstract class _$$FeedStateLoadingImplCopyWith<$Res> {
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value,
$Res Function(_$FeedStateLoadingImpl) then) =
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value, $Res Function(_$FeedStateLoadingImpl) then) =
__$$FeedStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$FeedStateLoadingImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
class __$$FeedStateLoadingImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
implements _$$FeedStateLoadingImplCopyWith<$Res> {
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
$Res Function(_$FeedStateLoadingImpl) _then)
: super(_value, _then);
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value, $Res Function(_$FeedStateLoadingImpl) _then) : super(_value, _then);
}
/// @nodoc
@@ -227,8 +214,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
}
@override
@@ -315,20 +301,14 @@ abstract class FeedStateLoading implements FeedState {
/// @nodoc
abstract class _$$FeedStateLoadedImplCopyWith<$Res> {
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value,
$Res Function(_$FeedStateLoadedImpl) then) =
__$$FeedStateLoadedImplCopyWithImpl<$Res>;
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value, $Res Function(_$FeedStateLoadedImpl) then) = __$$FeedStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({List<FeedBlogPostModel> feedBlogPostList});
}
/// @nodoc
class __$$FeedStateLoadedImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl>
implements _$$FeedStateLoadedImplCopyWith<$Res> {
__$$FeedStateLoadedImplCopyWithImpl(
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
: super(_value, _then);
class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl> implements _$$FeedStateLoadedImplCopyWith<$Res> {
__$$FeedStateLoadedImplCopyWithImpl(_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then) : super(_value, _then);
@pragma('vm:prefer-inline')
@override
@@ -347,15 +327,12 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$FeedStateLoadedImpl implements FeedStateLoaded {
const _$FeedStateLoadedImpl(
{required final List<FeedBlogPostModel> feedBlogPostList})
: _feedBlogPostList = feedBlogPostList;
const _$FeedStateLoadedImpl({required final List<FeedBlogPostModel> feedBlogPostList}) : _feedBlogPostList = feedBlogPostList;
final List<FeedBlogPostModel> _feedBlogPostList;
@override
List<FeedBlogPostModel> get feedBlogPostList {
if (_feedBlogPostList is EqualUnmodifiableListView)
return _feedBlogPostList;
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_feedBlogPostList);
}
@@ -370,20 +347,16 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FeedStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._feedBlogPostList, _feedBlogPostList));
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList));
}
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
this, _$identity);
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -461,32 +434,23 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
}
abstract class FeedStateLoaded implements FeedState {
const factory FeedStateLoaded(
{required final List<FeedBlogPostModel> feedBlogPostList}) =
_$FeedStateLoadedImpl;
const factory FeedStateLoaded({required final List<FeedBlogPostModel> feedBlogPostList}) = _$FeedStateLoadedImpl;
List<FeedBlogPostModel> get feedBlogPostList;
@JsonKey(ignore: true)
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$FeedStateErrorImplCopyWith<$Res> {
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value,
$Res Function(_$FeedStateErrorImpl) then) =
__$$FeedStateErrorImplCopyWithImpl<$Res>;
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value, $Res Function(_$FeedStateErrorImpl) then) = __$$FeedStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$FeedStateErrorImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl>
implements _$$FeedStateErrorImplCopyWith<$Res> {
__$$FeedStateErrorImplCopyWithImpl(
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
: super(_value, _then);
class __$$FeedStateErrorImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl> implements _$$FeedStateErrorImplCopyWith<$Res> {
__$$FeedStateErrorImplCopyWithImpl(_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then) : super(_value, _then);
@pragma('vm:prefer-inline')
@override
@@ -520,8 +484,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FeedStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -530,9 +493,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
this, _$identity);
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -610,11 +571,9 @@ class _$FeedStateErrorImpl implements FeedStateError {
}
abstract class FeedStateError implements FeedState {
const factory FeedStateError({required final String errorMessage}) =
_$FeedStateErrorImpl;
const factory FeedStateError({required final String errorMessage}) = _$FeedStateErrorImpl;
String get errorMessage;
@JsonKey(ignore: true)
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,15 +1,14 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_state.dart';
import 'package:flutter/cupertino.dart';
import 'package:go_router/go_router.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/presentation/feed/feed_screen/widgets/feed_search_view.dart';
import 'package:eatvio_app/presentation/feed/feed_screen/widgets/feed_scroll_item.dart';
import 'package:eatvio_app/presentation/feed/feed_screen/widgets/feed_search_view.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
class FeedScreen extends StatelessWidget {
@@ -153,7 +152,7 @@ class FeedScreen extends StatelessWidget {
children: [
ListTile(
leading: CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! + (''),
imageUrl: baseUrl + '/storage/' + (''),
/// todo profile photo path
imageBuilder: (context, imageProvider) => CircleAvatar(
@@ -224,7 +223,7 @@ class FeedScreen extends StatelessWidget {
),
SizedBox(height: 16.0),
CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! + (post.image),
imageUrl: baseUrl + '/storage/' + (post.image),
imageBuilder: (context, imageProvider) => Stack(
children: [
ClipRRect(

View File

@@ -8,6 +8,6 @@ part 'feed_service.g.dart';
abstract class FeedService {
factory FeedService(Dio dio, {String baseUrl}) = _FeedService;
@GET('/blogPosts/index')
@GET('/api/blogPosts/index')
Future<FeedBlogPostSettingsModel> getBlocPostList();
}

View File

@@ -24,31 +24,28 @@ class _FeedService implements FeedService {
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<FeedBlogPostSettingsModel>(Options(
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<FeedBlogPostSettingsModel>(Options(
method: 'GET',
headers: _headers,
extra: _extra,
)
.compose(
_dio.options,
'/blogPosts/index',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(
_dio.options.baseUrl,
baseUrl,
))));
.compose(
_dio.options,
'/api/blogPosts/index',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(
_dio.options.baseUrl,
baseUrl,
))));
final _value = FeedBlogPostSettingsModel.fromJson(_result.data!);
return _value;
}
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 {