feat(feed):

This commit is contained in:
mso7nueh
2024-08-16 14:04:58 +03:00
parent fbd9e8c656
commit 8b7f2edd9f
48 changed files with 1767 additions and 1098 deletions

View File

@@ -4,6 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:go_router/go_router.dart';
import 'package:share_plus/share_plus.dart';
@@ -21,10 +22,11 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
Widget build(BuildContext context) {
return InkWell(
borderRadius: BorderRadius.circular(12),
onTap: () => GoRouter.of(context).pushNamed(
'blogPostScreen',
extra: widget.feedBlogPostModel,
),
onTap: () =>
GoRouter.of(context).pushNamed(
'blogPostScreen',
extra: widget.feedBlogPostModel,
),
child: Ink(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
@@ -71,12 +73,15 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
if (widget.feedBlogPostModel.title.isNotEmpty && widget.feedBlogPostModel.description.isNotEmpty) SizedBox(height: 8),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Text(
widget.feedBlogPostModel.description,
style: TextStyle(
color: Colors.black87,
),
child: Html(
data: widget.feedBlogPostModel.description,
),
// child: Text(
// widget.feedBlogPostModel.description,
// style: TextStyle(
// color: Colors.black87,
// ),
// ),
),
if (widget.feedBlogPostModel.title.isNotEmpty || widget.feedBlogPostModel.description.isNotEmpty) SizedBox(height: 8),
GestureDetector(
@@ -106,19 +111,21 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
_iconButton(
icon: Icons.mode_comment_outlined,
text: widget.feedBlogPostModel.totalComments.toString(),
onTap: () => GoRouter.of(context).pushNamed(
'blogPostScreen',
extra: widget.feedBlogPostModel,
),
onTap: () =>
GoRouter.of(context).pushNamed(
'blogPostScreen',
extra: widget.feedBlogPostModel,
),
),
SizedBox(width: 8),
_iconButton(
icon: Icons.reply_rounded,
onTap: () => Share.shareUri(
Uri.parse(
baseUrl + '/ru/blog_post/' + widget.feedBlogPostModel.id.toString(),
),
),
onTap: () =>
Share.shareUri(
Uri.parse(
baseUrl + '/ru/blog_post/' + widget.feedBlogPostModel.id.toString(),
),
),
),
Spacer(),
Icon(