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

@@ -5,8 +5,7 @@ import 'package:eatvio_app/features/blog_post/repositories/blog_post_repository.
class BlogPostCubit extends Cubit<BlogPostState> {
final BlogPostRepository blogPostRepository;
BlogPostCubit({required this.blogPostRepository})
: super(const BlogPostState.loading());
BlogPostCubit({required this.blogPostRepository}) : super(const BlogPostState.loading());
loadBlogPost(String blogPostID) async {
emit(const BlogPostState.loading());

View File

@@ -70,14 +70,11 @@ mixin _$BlogPostState {
/// @nodoc
abstract class $BlogPostStateCopyWith<$Res> {
factory $BlogPostStateCopyWith(
BlogPostState value, $Res Function(BlogPostState) then) =
_$BlogPostStateCopyWithImpl<$Res, BlogPostState>;
factory $BlogPostStateCopyWith(BlogPostState value, $Res Function(BlogPostState) then) = _$BlogPostStateCopyWithImpl<$Res, BlogPostState>;
}
/// @nodoc
class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState>
implements $BlogPostStateCopyWith<$Res> {
class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState> implements $BlogPostStateCopyWith<$Res> {
_$BlogPostStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
@@ -88,18 +85,12 @@ class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState>
/// @nodoc
abstract class _$$BlogPostStateImplCopyWith<$Res> {
factory _$$BlogPostStateImplCopyWith(
_$BlogPostStateImpl value, $Res Function(_$BlogPostStateImpl) then) =
__$$BlogPostStateImplCopyWithImpl<$Res>;
factory _$$BlogPostStateImplCopyWith(_$BlogPostStateImpl value, $Res Function(_$BlogPostStateImpl) then) = __$$BlogPostStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$BlogPostStateImplCopyWithImpl<$Res>
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateImpl>
implements _$$BlogPostStateImplCopyWith<$Res> {
__$$BlogPostStateImplCopyWithImpl(
_$BlogPostStateImpl _value, $Res Function(_$BlogPostStateImpl) _then)
: super(_value, _then);
class __$$BlogPostStateImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateImpl> implements _$$BlogPostStateImplCopyWith<$Res> {
__$$BlogPostStateImplCopyWithImpl(_$BlogPostStateImpl _value, $Res Function(_$BlogPostStateImpl) _then) : super(_value, _then);
}
/// @nodoc
@@ -114,8 +105,7 @@ class _$BlogPostStateImpl implements _BlogPostState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$BlogPostStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlogPostStateImpl);
}
@override
@@ -202,18 +192,14 @@ abstract class _BlogPostState implements BlogPostState {
/// @nodoc
abstract class _$$BlogPostStateLoadingImplCopyWith<$Res> {
factory _$$BlogPostStateLoadingImplCopyWith(_$BlogPostStateLoadingImpl value,
$Res Function(_$BlogPostStateLoadingImpl) then) =
factory _$$BlogPostStateLoadingImplCopyWith(_$BlogPostStateLoadingImpl value, $Res Function(_$BlogPostStateLoadingImpl) then) =
__$$BlogPostStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$BlogPostStateLoadingImplCopyWithImpl<$Res>
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadingImpl>
class __$$BlogPostStateLoadingImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadingImpl>
implements _$$BlogPostStateLoadingImplCopyWith<$Res> {
__$$BlogPostStateLoadingImplCopyWithImpl(_$BlogPostStateLoadingImpl _value,
$Res Function(_$BlogPostStateLoadingImpl) _then)
: super(_value, _then);
__$$BlogPostStateLoadingImplCopyWithImpl(_$BlogPostStateLoadingImpl _value, $Res Function(_$BlogPostStateLoadingImpl) _then) : super(_value, _then);
}
/// @nodoc
@@ -228,9 +214,7 @@ class _$BlogPostStateLoadingImpl implements BlogPostStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BlogPostStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlogPostStateLoadingImpl);
}
@override
@@ -317,8 +301,7 @@ abstract class BlogPostStateLoading implements BlogPostState {
/// @nodoc
abstract class _$$BlogPostStateLoadedImplCopyWith<$Res> {
factory _$$BlogPostStateLoadedImplCopyWith(_$BlogPostStateLoadedImpl value,
$Res Function(_$BlogPostStateLoadedImpl) then) =
factory _$$BlogPostStateLoadedImplCopyWith(_$BlogPostStateLoadedImpl value, $Res Function(_$BlogPostStateLoadedImpl) then) =
__$$BlogPostStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({BlogPostModel blogPost});
@@ -327,12 +310,9 @@ abstract class _$$BlogPostStateLoadedImplCopyWith<$Res> {
}
/// @nodoc
class __$$BlogPostStateLoadedImplCopyWithImpl<$Res>
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadedImpl>
class __$$BlogPostStateLoadedImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadedImpl>
implements _$$BlogPostStateLoadedImplCopyWith<$Res> {
__$$BlogPostStateLoadedImplCopyWithImpl(_$BlogPostStateLoadedImpl _value,
$Res Function(_$BlogPostStateLoadedImpl) _then)
: super(_value, _then);
__$$BlogPostStateLoadedImplCopyWithImpl(_$BlogPostStateLoadedImpl _value, $Res Function(_$BlogPostStateLoadedImpl) _then) : super(_value, _then);
@pragma('vm:prefer-inline')
@override
@@ -372,10 +352,7 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BlogPostStateLoadedImpl &&
(identical(other.blogPost, blogPost) ||
other.blogPost == blogPost));
(other.runtimeType == runtimeType && other is _$BlogPostStateLoadedImpl && (identical(other.blogPost, blogPost) || other.blogPost == blogPost));
}
@override
@@ -385,8 +362,7 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith =>
__$$BlogPostStateLoadedImplCopyWithImpl<_$BlogPostStateLoadedImpl>(
this, _$identity);
__$$BlogPostStateLoadedImplCopyWithImpl<_$BlogPostStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -464,31 +440,25 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
}
abstract class BlogPostStateLoaded implements BlogPostState {
const factory BlogPostStateLoaded({required final BlogPostModel blogPost}) =
_$BlogPostStateLoadedImpl;
const factory BlogPostStateLoaded({required final BlogPostModel blogPost}) = _$BlogPostStateLoadedImpl;
BlogPostModel get blogPost;
@JsonKey(ignore: true)
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$BlogPostStateErrorImplCopyWith<$Res> {
factory _$$BlogPostStateErrorImplCopyWith(_$BlogPostStateErrorImpl value,
$Res Function(_$BlogPostStateErrorImpl) then) =
factory _$$BlogPostStateErrorImplCopyWith(_$BlogPostStateErrorImpl value, $Res Function(_$BlogPostStateErrorImpl) then) =
__$$BlogPostStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$BlogPostStateErrorImplCopyWithImpl<$Res>
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateErrorImpl>
class __$$BlogPostStateErrorImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateErrorImpl>
implements _$$BlogPostStateErrorImplCopyWith<$Res> {
__$$BlogPostStateErrorImplCopyWithImpl(_$BlogPostStateErrorImpl _value,
$Res Function(_$BlogPostStateErrorImpl) _then)
: super(_value, _then);
__$$BlogPostStateErrorImplCopyWithImpl(_$BlogPostStateErrorImpl _value, $Res Function(_$BlogPostStateErrorImpl) _then) : super(_value, _then);
@pragma('vm:prefer-inline')
@override
@@ -522,8 +492,7 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BlogPostStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -533,8 +502,7 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
@override
@pragma('vm:prefer-inline')
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith =>
__$$BlogPostStateErrorImplCopyWithImpl<_$BlogPostStateErrorImpl>(
this, _$identity);
__$$BlogPostStateErrorImplCopyWithImpl<_$BlogPostStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -612,11 +580,9 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
}
abstract class BlogPostStateError implements BlogPostState {
const factory BlogPostStateError({required final String errorMessage}) =
_$BlogPostStateErrorImpl;
const factory BlogPostStateError({required final String errorMessage}) = _$BlogPostStateErrorImpl;
String get errorMessage;
@JsonKey(ignore: true)
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> 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/blog_post/presentation/bloc/blog_post_cubit.dart';
import 'package:eatvio_app/features/blog_post/presentation/bloc/blog_post_state.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter/cupertino.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'package:cached_network_image/cached_network_image.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 BlogPostScreen extends StatelessWidget {
final String blogPostID;
@@ -97,8 +96,7 @@ class BlogPostScreen extends StatelessWidget {
),
),
CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! +
(state.blogPost.author_avatar_path ?? ''),
imageUrl: baseUrl + '/storage/' + (state.blogPost.author_avatar_path ?? ''),
imageBuilder: (context, imageProvider) => CircleAvatar(
backgroundImage: imageProvider,
radius: 25,
@@ -221,7 +219,7 @@ class BlogPostScreen extends StatelessWidget {
_buildImage(BlogPostStateLoaded state) {
return CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! + (state.blogPost.image ?? ""),
imageUrl: baseUrl + '/storage/' + (state.blogPost.image ?? ""),
imageBuilder: (context, imageProvider) => Stack(
children: [
ClipRRect(