diff --git a/lib/features/feed/presentation/widgets/blog_post_widget.dart b/lib/features/feed/presentation/widgets/blog_post_widget.dart index 089ad1d0..89877270 100644 --- a/lib/features/feed/presentation/widgets/blog_post_widget.dart +++ b/lib/features/feed/presentation/widgets/blog_post_widget.dart @@ -2,13 +2,13 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:dismissible_page/dismissible_page.dart'; import 'package:eatvio_app/core/const.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/widgets/feed_icon_button.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/feed/models/diets_pagination_model.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/widgets/subscribe_button_widget.dart'; import 'package:flutter/material.dart'; @@ -179,14 +179,15 @@ class _BlogPostWidgetState extends State { ), ), if (state.feedBlogPostList[widget.index].description.length > 200) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), + const Padding( + padding: EdgeInsets.symmetric(horizontal: 12), child: Text( - 'Читать полностью...', + 'Показать ещё', style: TextStyle( height: 1, - color: appTheme.blueA400, - decoration: TextDecoration.underline, + color: Color(0xFF8B8B8B), + fontSize: 14, + fontWeight: FontWeight.w600, ), ), ), diff --git a/lib/features/feed/presentation/widgets/recipes_widget.dart b/lib/features/feed/presentation/widgets/recipes_widget.dart index 30202813..02c05eab 100644 --- a/lib/features/feed/presentation/widgets/recipes_widget.dart +++ b/lib/features/feed/presentation/widgets/recipes_widget.dart @@ -188,14 +188,15 @@ class _RecipesWidgetState extends State { ), ), if (widget.recipe.description.length > 200) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), + const Padding( + padding: EdgeInsets.symmetric(horizontal: 12), child: Text( - 'Читать полностью...', + 'Показать ещё', style: TextStyle( height: 1, - color: appTheme.blueA400, - decoration: TextDecoration.underline, + color: Color(0xFF8B8B8B), + fontSize: 14, + fontWeight: FontWeight.w600, ), ), ), diff --git a/lib/features/profile/presentation/widgets/circumference_chart_widget.dart b/lib/features/profile/presentation/widgets/circumference_chart_widget.dart index f4f6e997..99d674e5 100644 --- a/lib/features/profile/presentation/widgets/circumference_chart_widget.dart +++ b/lib/features/profile/presentation/widgets/circumference_chart_widget.dart @@ -194,87 +194,89 @@ class _CircumferenceChartWidgetState extends State { useRootNavigator: true, context: context, builder: (context) { - return Column( - children: [ - Expanded( - child: Row( - children: [ - Expanded( - child: CupertinoPicker( - magnification: 1.22, - squeeze: 1.2, - useMagnifier: true, - scrollController: chestController, - itemExtent: 24, - onSelectedItemChanged: (int value) { - chest = value; - }, - children: [ - for (int i = 20; i < 200; i++) Text('$i'), - ], + return SafeArea( + child: Column( + children: [ + Expanded( + child: Row( + children: [ + Expanded( + child: CupertinoPicker( + magnification: 1.22, + squeeze: 1.2, + useMagnifier: true, + scrollController: chestController, + itemExtent: 24, + onSelectedItemChanged: (int value) { + chest = value; + }, + children: [ + for (int i = 20; i < 200; i++) Text('$i'), + ], + ), ), - ), - Expanded( - child: CupertinoPicker( - magnification: 1.22, - squeeze: 1.2, - useMagnifier: true, - scrollController: waistController, - itemExtent: 24, - onSelectedItemChanged: (int value) { - waist = value; - }, - children: [ - for (int i = 20; i < 200; i++) Text('$i'), - ], + Expanded( + child: CupertinoPicker( + magnification: 1.22, + squeeze: 1.2, + useMagnifier: true, + scrollController: waistController, + itemExtent: 24, + onSelectedItemChanged: (int value) { + waist = value; + }, + children: [ + for (int i = 20; i < 200; i++) Text('$i'), + ], + ), ), - ), - Expanded( - child: CupertinoPicker( - magnification: 1.22, - squeeze: 1.2, - useMagnifier: true, - scrollController: hipController, - itemExtent: 24, - onSelectedItemChanged: (int value) { - hip = value; - }, - children: [ - for (int i = 20; i < 200; i++) Text('$i'), - ], + Expanded( + child: CupertinoPicker( + magnification: 1.22, + squeeze: 1.2, + useMagnifier: true, + scrollController: hipController, + itemExtent: 24, + onSelectedItemChanged: (int value) { + hip = value; + }, + children: [ + for (int i = 20; i < 200; i++) Text('$i'), + ], + ), ), - ), - ], - ), - ), - InkWell( - onTap: () { - widget.profileCubit?.addCircumference( - chestCircumference: chest + 20, - waistCircumference: waist + 20, - hipCircumference: hip + 20, - ); - Navigator.of(context).pop(); - }, - borderRadius: BorderRadius.circular(16), - child: Ink( - width: MediaQuery.of(context).size.width - 32, - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: appTheme.blueA400, - borderRadius: BorderRadius.circular(16), + ], ), - child: const Center( - child: Text( - 'Сохранить', - style: TextStyle( - color: Colors.white, + ), + InkWell( + onTap: () { + widget.profileCubit?.addCircumference( + chestCircumference: chest + 20, + waistCircumference: waist + 20, + hipCircumference: hip + 20, + ); + Navigator.of(context).pop(); + }, + borderRadius: BorderRadius.circular(16), + child: Ink( + width: MediaQuery.of(context).size.width - 32, + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: appTheme.blueA400, + borderRadius: BorderRadius.circular(16), + ), + child: const Center( + child: Text( + 'Сохранить', + style: TextStyle( + color: Colors.white, + ), ), ), ), ), - ), - ], + ], + ), ); }, ); diff --git a/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart b/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart index a180fee6..06bcc85d 100644 --- a/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart +++ b/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart @@ -128,14 +128,15 @@ class _ProfileBlogPostWidgetState extends State { ), ), if (state.blogPosts[widget.index].description.length > 200) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), + const Padding( + padding: EdgeInsets.symmetric(horizontal: 12), child: Text( - 'Читать полностью...', + 'Показать ещё', style: TextStyle( height: 1, - color: appTheme.blueA400, - decoration: TextDecoration.underline, + color: Color(0xFF8B8B8B), + fontSize: 14, + fontWeight: FontWeight.w600, ), ), ), diff --git a/lib/features/profile/presentation/widgets/weight_chart_widget.dart b/lib/features/profile/presentation/widgets/weight_chart_widget.dart index 4062bcd2..3084f882 100644 --- a/lib/features/profile/presentation/widgets/weight_chart_widget.dart +++ b/lib/features/profile/presentation/widgets/weight_chart_widget.dart @@ -135,68 +135,70 @@ class _WeightChartWidgetState extends State { useRootNavigator: true, context: context, builder: (context) { - return Column( - children: [ - Expanded( - child: Row( - children: [ - Expanded( - child: CupertinoPicker( - magnification: 1.22, - squeeze: 1.2, - useMagnifier: true, - scrollController: weightKiloController, - itemExtent: 24, - onSelectedItemChanged: (int value) { - weightKilo = value + 20; - }, - children: [ - for (int i = 20; i < 300; i++) Text('$i'), - ], + return SafeArea( + child: Column( + children: [ + Expanded( + child: Row( + children: [ + Expanded( + child: CupertinoPicker( + magnification: 1.22, + squeeze: 1.2, + useMagnifier: true, + scrollController: weightKiloController, + itemExtent: 24, + onSelectedItemChanged: (int value) { + weightKilo = value + 20; + }, + children: [ + for (int i = 20; i < 300; i++) Text('$i'), + ], + ), ), - ), - Expanded( - child: CupertinoPicker( - magnification: 1.22, - squeeze: 1.2, - useMagnifier: true, - scrollController: weightGramsController, - itemExtent: 24, - onSelectedItemChanged: (int value) { - weightGrams = value; - }, - children: [ - for (int i = 0; i < 10; i++) Text('$i'), - ], + Expanded( + child: CupertinoPicker( + magnification: 1.22, + squeeze: 1.2, + useMagnifier: true, + scrollController: weightGramsController, + itemExtent: 24, + onSelectedItemChanged: (int value) { + weightGrams = value; + }, + children: [ + for (int i = 0; i < 10; i++) Text('$i'), + ], + ), ), - ), - ], - ), - ), - InkWell( - onTap: () { - widget.profileCubit?.addWeight(weight: double.parse('$weightKilo.$weightGrams')); - Navigator.of(context).pop(); - }, - borderRadius: BorderRadius.circular(16), - child: Ink( - width: MediaQuery.of(context).size.width - 32, - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: appTheme.blueA400, - borderRadius: BorderRadius.circular(16), + ], ), - child: const Center( - child: Text( - 'Сохранить', - style: TextStyle( - color: Colors.white, + ), + InkWell( + onTap: () { + widget.profileCubit?.addWeight(weight: double.parse('$weightKilo.$weightGrams')); + Navigator.of(context).pop(); + }, + borderRadius: BorderRadius.circular(16), + child: Ink( + width: MediaQuery.of(context).size.width - 32, + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: appTheme.blueA400, + borderRadius: BorderRadius.circular(16), + ), + child: const Center( + child: Text( + 'Сохранить', + style: TextStyle( + color: Colors.white, + ), ), ), ), ), - ), - ], + ], + ), ); }, ); diff --git a/lib/features/settings/presentation/pages/settings_screen.dart b/lib/features/settings/presentation/pages/settings_screen.dart index c7f97d39..18d6a261 100644 --- a/lib/features/settings/presentation/pages/settings_screen.dart +++ b/lib/features/settings/presentation/pages/settings_screen.dart @@ -46,24 +46,26 @@ class _SettingsScreenState extends State { appBar: AppBar( title: const Text('Настройки'), ), - body: SingleChildScrollView( - padding: const EdgeInsets.symmetric(vertical: 16), - physics: const BouncingScrollPhysics(), - child: Column( - children: [ - _additionalInfo(state), - const SizedBox(height: 12), - _notifications(state), - const SizedBox(height: 12), - _aboutEatvio(state), - const SizedBox(height: 12), - if (!state.profile.roles.contains('consultant')) - Padding( - padding: const EdgeInsets.only(bottom: 8), - child: _becomeConsultantButton(state), - ), - _deleteAccountButton(state), - ], + body: SafeArea( + child: SingleChildScrollView( + padding: const EdgeInsets.symmetric(vertical: 16), + physics: const BouncingScrollPhysics(), + child: Column( + children: [ + _additionalInfo(state), + const SizedBox(height: 12), + _notifications(state), + const SizedBox(height: 12), + _aboutEatvio(state), + const SizedBox(height: 12), + if (!state.profile.roles.contains('consultant')) + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: _becomeConsultantButton(state), + ), + _deleteAccountButton(state), + ], + ), ), ), );