diff --git a/lib/features/diary/presentation/pages/diary_screen.dart b/lib/features/diary/presentation/pages/diary_screen.dart index c8c4740e..9f3dc735 100644 --- a/lib/features/diary/presentation/pages/diary_screen.dart +++ b/lib/features/diary/presentation/pages/diary_screen.dart @@ -586,6 +586,7 @@ class _DiaryScreenState extends State { actions: [ CupertinoActionSheetAction( onPressed: () async { + Navigator.of(context).pop(); final picker = ImagePicker(); XFile? image = await picker.pickImage(source: ImageSource.camera); if (image != null) @@ -595,7 +596,6 @@ class _DiaryScreenState extends State { mealId: diaryDay.meals[currentSelectedMealNumber - 1].id, date: _selectedDay.toString(), ); - Navigator.of(context).pop(); }, child: const Row( children: const [ @@ -607,6 +607,7 @@ class _DiaryScreenState extends State { ), CupertinoActionSheetAction( onPressed: () async { + Navigator.of(context).pop(); final picker = ImagePicker(); List? images = await picker.pickMultiImage(); if (images.isNotEmpty) @@ -616,7 +617,6 @@ class _DiaryScreenState extends State { mealId: diaryDay.meals[currentSelectedMealNumber - 1].id, date: _selectedDay.toString(), ); - Navigator.of(context).pop(); }, child: const Row( children: const [ @@ -898,7 +898,7 @@ class _DiaryScreenState extends State { ); }, itemSeparatorBuilder: (context, index) => _divider(context), - onSelected: (newSelectedGlossary) { + onSelected: (newSelectedGlossary) async { setState(() { selectedGlossary = newSelectedGlossary; productNameController.text = selectedGlossary!.name; @@ -946,7 +946,6 @@ class _DiaryScreenState extends State { : selectedGlossary!.grInPortion == 0 ? '100' : '1', - autofocus: true, suffixText: selectedGlossary == null ? 'гр' : selectedGlossary?.grInPortion == 0 diff --git a/lib/features/feed/presentation/widgets/blog_post_widget.dart b/lib/features/feed/presentation/widgets/blog_post_widget.dart index e10ff485..e4ad937c 100644 --- a/lib/features/feed/presentation/widgets/blog_post_widget.dart +++ b/lib/features/feed/presentation/widgets/blog_post_widget.dart @@ -11,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:fluttertoast/fluttertoast.dart'; import 'package:go_router/go_router.dart'; import 'package:share_plus/share_plus.dart'; @@ -87,6 +88,27 @@ class _BlogPostWidgetState extends State { ), ], ), + const Spacer(), + InkWell( + onTap: () { + Fluttertoast.showToast(msg: 'ща доделаем'); + }, + borderRadius: BorderRadius.circular(8), + child: Ink( + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: appTheme.gray200, + ), + child: Text( + 'Подписаться', + style: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w500, + ), + ), + ), + ), ], ), ),