feat(profile): add profile charts models, requests. Max length of description in posts, recipes, diets = 200

This commit is contained in:
mso7nueh
2024-09-13 14:22:57 +03:00
parent a826cba866
commit c800d35663
111 changed files with 5760 additions and 3215 deletions

View File

@@ -105,7 +105,9 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: Html(
data: widget.feedBlogPostModel.description,
data: widget.feedBlogPostModel.description.length > 200
? widget.feedBlogPostModel.description.substring(0, 200)
: widget.feedBlogPostModel.description,
style: {
"*": Style(
color: Colors.black87,
@@ -113,6 +115,18 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
},
),
),
if (widget.feedBlogPostModel.description.length > 200)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
'Читать полностью...',
style: TextStyle(
height: 1,
color: appTheme.blueA400,
decoration: TextDecoration.underline,
),
),
),
if (widget.feedBlogPostModel.title.isNotEmpty || widget.feedBlogPostModel.description.isNotEmpty) SizedBox(height: 8),
GestureDetector(
onTap: () {