feat(feed): #338

This commit is contained in:
mso7nueh
2025-04-21 11:59:03 +03:00
parent 2d113024ff
commit 2275eee3d7
6 changed files with 171 additions and 162 deletions

View File

@@ -2,13 +2,13 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:dismissible_page/dismissible_page.dart'; import 'package:dismissible_page/dismissible_page.dart';
import 'package:eatvio_app/core/const.dart'; import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/core/enums/complained_content.dart'; import 'package:eatvio_app/core/enums/complained_content.dart';
import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:eatvio_app/core/utils/date_time_utils.dart'; import 'package:eatvio_app/core/utils/date_time_utils.dart';
import 'package:eatvio_app/core/widgets/feed_icon_button.dart'; import 'package:eatvio_app/core/widgets/feed_icon_button.dart';
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart'; import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
import 'package:eatvio_app/features/diets/presentation/widgets/more_options.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/more_options.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart'; import 'package:eatvio_app/features/feed/models/diets_pagination_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_cubit.dart';
import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_state.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_state.dart';
import 'package:eatvio_app/features/feed/presentation/widgets/subscribe_button_widget.dart'; import 'package:eatvio_app/features/feed/presentation/widgets/subscribe_button_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -179,14 +179,15 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
), ),
), ),
if (state.feedBlogPostList[widget.index].description.length > 200) if (state.feedBlogPostList[widget.index].description.length > 200)
Padding( const Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.symmetric(horizontal: 12),
child: Text( child: Text(
'Читать полностью...', 'Показать ещё',
style: TextStyle( style: TextStyle(
height: 1, height: 1,
color: appTheme.blueA400, color: Color(0xFF8B8B8B),
decoration: TextDecoration.underline, fontSize: 14,
fontWeight: FontWeight.w600,
), ),
), ),
), ),

View File

@@ -188,14 +188,15 @@ class _RecipesWidgetState extends State<RecipesWidget> {
), ),
), ),
if (widget.recipe.description.length > 200) if (widget.recipe.description.length > 200)
Padding( const Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.symmetric(horizontal: 12),
child: Text( child: Text(
'Читать полностью...', 'Показать ещё',
style: TextStyle( style: TextStyle(
height: 1, height: 1,
color: appTheme.blueA400, color: Color(0xFF8B8B8B),
decoration: TextDecoration.underline, fontSize: 14,
fontWeight: FontWeight.w600,
), ),
), ),
), ),

View File

@@ -194,7 +194,8 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
useRootNavigator: true, useRootNavigator: true,
context: context, context: context,
builder: (context) { builder: (context) {
return Column( return SafeArea(
child: Column(
children: [ children: [
Expanded( Expanded(
child: Row( child: Row(
@@ -275,6 +276,7 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
), ),
), ),
], ],
),
); );
}, },
); );

View File

@@ -128,14 +128,15 @@ class _ProfileBlogPostWidgetState extends State<ProfileBlogPostWidget> {
), ),
), ),
if (state.blogPosts[widget.index].description.length > 200) if (state.blogPosts[widget.index].description.length > 200)
Padding( const Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.symmetric(horizontal: 12),
child: Text( child: Text(
'Читать полностью...', 'Показать ещё',
style: TextStyle( style: TextStyle(
height: 1, height: 1,
color: appTheme.blueA400, color: Color(0xFF8B8B8B),
decoration: TextDecoration.underline, fontSize: 14,
fontWeight: FontWeight.w600,
), ),
), ),
), ),

View File

@@ -135,7 +135,8 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
useRootNavigator: true, useRootNavigator: true,
context: context, context: context,
builder: (context) { builder: (context) {
return Column( return SafeArea(
child: Column(
children: [ children: [
Expanded( Expanded(
child: Row( child: Row(
@@ -197,6 +198,7 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
), ),
), ),
], ],
),
); );
}, },
); );

View File

@@ -46,7 +46,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
appBar: AppBar( appBar: AppBar(
title: const Text('Настройки'), title: const Text('Настройки'),
), ),
body: SingleChildScrollView( body: SafeArea(
child: SingleChildScrollView(
padding: const EdgeInsets.symmetric(vertical: 16), padding: const EdgeInsets.symmetric(vertical: 16),
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
child: Column( child: Column(
@@ -66,6 +67,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
], ],
), ),
), ),
),
); );
} }
if (state is SettingsStateError) { if (state is SettingsStateError) {