feature(blogPosts): add image load, fix blog post view

This commit is contained in:
mso7nueh
2024-07-17 17:04:00 +03:00
parent 863bd3132c
commit a94e2b9db4
8 changed files with 29 additions and 25 deletions

View File

@@ -8,6 +8,6 @@ part 'blog_post_service.g.dart';
abstract class BlogPostService {
factory BlogPostService(Dio dio, {String baseUrl}) = _BlogPostService;
@GET('/api/feed/show/{id}')
@GET('/api/blogPosts/show/{id}')
Future<BlogPostModel> getBlogPost(@Path() String id);
}

View File

@@ -32,7 +32,7 @@ class _BlogPostService implements BlogPostService {
)
.compose(
_dio.options,
'/api/feed/show/${id}',
'/api/blogPosts/show/${id}',
queryParameters: queryParameters,
data: _data,
)

View File

@@ -44,7 +44,6 @@ class BlogPostCreateScreen extends StatelessWidget {
}
_buildBlogPostCreate(BuildContext context, BlogPostCreateLoadedState state) {
print(state.image);
return Scaffold(
resizeToAvoidBottomInset: false,
body: Container(

View File

@@ -8,7 +8,6 @@ class FeedCubit extends Cubit<FeedState> {
FeedCubit({required this.feedRepository}) : super(const FeedState.loading());
loadFeedBlogPostList() async {
emit(const FeedState.loading());
try {
final feedBlogPostList = await feedRepository.getFeedBlogPostList();
emit(FeedState.loaded(feedBlogPostList: feedBlogPostList));