From 0926b5053782972d23186fbc051758468414cdec Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 2 Jul 2025 14:33:12 +0300 Subject: [PATCH 1/3] fix(descriptions): Issue-540 --- .../blog_post/presentation/pages/blog_post_screen.dart | 2 +- lib/features/feed/presentation/widgets/blog_post_widget.dart | 4 ++-- lib/features/feed/presentation/widgets/diets_widget.dart | 2 +- lib/features/feed/presentation/widgets/plan_widget.dart | 2 +- lib/features/feed/presentation/widgets/recipes_widget.dart | 4 +++- .../my_diets/presentation/widgets/my_diet_widget.dart | 2 +- .../my_plans/presentation/widgets/my_plan_widget.dart | 2 +- .../presentation/widgets/profile_blog_post_widget.dart | 4 ++-- .../recipe/presentation/widgets/my_recipe_widget.dart | 4 +++- 9 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/features/blog_post/presentation/pages/blog_post_screen.dart b/lib/features/blog_post/presentation/pages/blog_post_screen.dart index 580e89f0..a7b900ae 100644 --- a/lib/features/blog_post/presentation/pages/blog_post_screen.dart +++ b/lib/features/blog_post/presentation/pages/blog_post_screen.dart @@ -213,7 +213,7 @@ class _BlogPostScreenState extends State { if (widget.blogPost.description.isNotEmpty) Padding( padding: const EdgeInsets.symmetric(horizontal: 8), - child: Html(data: widget.blogPost.description, style: {"*": Style(color: Colors.black87)}), + child: Html(data: widget.blogPost.description.replaceAll('\n', '
'), style: {"*": Style(color: Colors.black87)}), ), const SizedBox(height: 8), if (widget.blogPost.image.isNotEmpty) diff --git a/lib/features/feed/presentation/widgets/blog_post_widget.dart b/lib/features/feed/presentation/widgets/blog_post_widget.dart index c6eac244..4310df61 100644 --- a/lib/features/feed/presentation/widgets/blog_post_widget.dart +++ b/lib/features/feed/presentation/widgets/blog_post_widget.dart @@ -156,9 +156,9 @@ class _BlogPostWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 4), child: Html( - data: state.feedBlogPostList[widget.index].description.length > 200 + data: (state.feedBlogPostList[widget.index].description.length > 200 ? state.feedBlogPostList[widget.index].description.substring(0, 200) - : state.feedBlogPostList[widget.index].description, + : state.feedBlogPostList[widget.index].description).replaceAll('\n', '
'), style: { "*": Style( fontSize: FontSize(16), diff --git a/lib/features/feed/presentation/widgets/diets_widget.dart b/lib/features/feed/presentation/widgets/diets_widget.dart index d008e3c4..44c45ff0 100644 --- a/lib/features/feed/presentation/widgets/diets_widget.dart +++ b/lib/features/feed/presentation/widgets/diets_widget.dart @@ -131,7 +131,7 @@ class _DietsWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Html( - data: widget.diet.details.length > 200 ? '${widget.diet.details.substring(0, 200)}...' : widget.diet.details, + data: widget.diet.details.length > 200 ? '${widget.diet.details.substring(0, 200).replaceAll('\n', '
')}...' : widget.diet.details.replaceAll('\n', '
'), style: { "*": Style( margin: Margins.zero, diff --git a/lib/features/feed/presentation/widgets/plan_widget.dart b/lib/features/feed/presentation/widgets/plan_widget.dart index 35bd9d63..0b4f9d54 100644 --- a/lib/features/feed/presentation/widgets/plan_widget.dart +++ b/lib/features/feed/presentation/widgets/plan_widget.dart @@ -137,7 +137,7 @@ class _PlanWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Html( - data: widget.plan.details.length > 200 ? '${widget.plan.details.substring(0, 200)}...' : widget.plan.details, + data: widget.plan.details.length > 200 ? '${widget.plan.details.substring(0, 200).replaceAll('\n', '
')}...' : widget.plan.details.replaceAll('\n', '
'), style: { "*": Style( margin: Margins.zero, diff --git a/lib/features/feed/presentation/widgets/recipes_widget.dart b/lib/features/feed/presentation/widgets/recipes_widget.dart index 797c0599..5c3b11ec 100644 --- a/lib/features/feed/presentation/widgets/recipes_widget.dart +++ b/lib/features/feed/presentation/widgets/recipes_widget.dart @@ -164,7 +164,9 @@ class _RecipesWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Html( - data: widget.recipe.description.length > 200 ? widget.recipe.description.substring(0, 200) : widget.recipe.description, + data: widget.recipe.description.length > 200 + ? widget.recipe.description.substring(0, 200).replaceAll('\n', '
') + : widget.recipe.description.replaceAll('\n', '
'), style: { "*": Style( color: appTheme.black, diff --git a/lib/features/my_diets/presentation/widgets/my_diet_widget.dart b/lib/features/my_diets/presentation/widgets/my_diet_widget.dart index 587e05ca..2db986b8 100644 --- a/lib/features/my_diets/presentation/widgets/my_diet_widget.dart +++ b/lib/features/my_diets/presentation/widgets/my_diet_widget.dart @@ -89,7 +89,7 @@ class _MyDietWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Html( - data: widget.diet.details.length > 200 ? '${widget.diet.details.substring(0, 200)}...' : widget.diet.details, + data: widget.diet.details.length > 200 ? '${widget.diet.details.substring(0, 200).replaceAll('\n', '
')}...' : widget.diet.details.replaceAll('\n', '
'), style: { "*": Style( margin: Margins.zero, diff --git a/lib/features/my_plans/presentation/widgets/my_plan_widget.dart b/lib/features/my_plans/presentation/widgets/my_plan_widget.dart index baea0c01..5a82eaeb 100644 --- a/lib/features/my_plans/presentation/widgets/my_plan_widget.dart +++ b/lib/features/my_plans/presentation/widgets/my_plan_widget.dart @@ -87,7 +87,7 @@ class _MyPlanWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Html( - data: widget.plan.details.length > 200 ? '${widget.plan.details.substring(0, 200)}...' : widget.plan.details, + data: widget.plan.details.length > 200 ? '${widget.plan.details.substring(0, 200).replaceAll('\n', '
')}...' : widget.plan.details.replaceAll('\n', '
'), style: { "*": Style( margin: Margins.zero, 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 68c29a0a..9cbf7524 100644 --- a/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart +++ b/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart @@ -128,8 +128,8 @@ class _ProfileBlogPostWidgetState extends State { padding: const EdgeInsets.symmetric(horizontal: 4), child: Html( data: state.blogPosts[widget.index].description.length > 200 - ? state.blogPosts[widget.index].description.substring(0, 200) - : state.blogPosts[widget.index].description, + ? state.blogPosts[widget.index].description.substring(0, 200).replaceAll('\n', '
') + : state.blogPosts[widget.index].description.replaceAll('\n', '
'), style: { "*": Style( fontSize: FontSize(16), diff --git a/lib/features/recipe/presentation/widgets/my_recipe_widget.dart b/lib/features/recipe/presentation/widgets/my_recipe_widget.dart index 370b4756..58bc42f4 100644 --- a/lib/features/recipe/presentation/widgets/my_recipe_widget.dart +++ b/lib/features/recipe/presentation/widgets/my_recipe_widget.dart @@ -111,7 +111,9 @@ class _MyRecipeWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Html( - data: widget.recipe.description.length > 200 ? '${widget.recipe.description.substring(0, 200)}...' : widget.recipe.description, + data: widget.recipe.description.length > 200 + ? '${widget.recipe.description.substring(0, 200).replaceAll('\n', '
')}...' + : widget.recipe.description.replaceAll('\n', '
'), style: { "*": Style( margin: Margins.zero, From 78096241861d1c57b6b3dbef1a0b366348afe274 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 2 Jul 2025 14:39:08 +0300 Subject: [PATCH 2/3] fix: go router ver --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d11956ec..7a57ff78 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: flutter_form_builder: ^10.0.1 image_picker: ^1.1.2 flutter_typeahead: ^5.2.0 - go_router: ^15.2.3 + go_router: ^16.0.0 keyboard_dismisser: ^3.0.0 retrofit: ^4.4.2 get_it: ^8.0.3 From 8d429862dd4790fcb16168f9bec8cacfe656f8ac Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 2 Jul 2025 14:46:54 +0300 Subject: [PATCH 3/3] fix: analyzer --- ios/Runner.xcodeproj/project.pbxproj | 6 ++-- ios/Runner/Info.plist | 2 +- .../presentation/dev_tools_screen.dart | 7 ++-- lib/features/dev_tools/test_cases.dart | 16 +++++----- pubspec.yaml | 32 +++++++++---------- 5 files changed, 32 insertions(+), 31 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 648ad30f..65f4f4f7 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -388,7 +388,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 37; + CURRENT_PROJECT_VERSION = 38; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -538,7 +538,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 37; + CURRENT_PROJECT_VERSION = 38; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -576,7 +576,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 37; + CURRENT_PROJECT_VERSION = 38; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 4009d581..89871ffa 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 37 + 38 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/lib/features/dev_tools/presentation/dev_tools_screen.dart b/lib/features/dev_tools/presentation/dev_tools_screen.dart index eab3c07e..b20167d8 100644 --- a/lib/features/dev_tools/presentation/dev_tools_screen.dart +++ b/lib/features/dev_tools/presentation/dev_tools_screen.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:eatvio_app/core/app_router.dart'; import 'package:eatvio_app/core/const.dart'; import 'package:eatvio_app/core/firebase_api.dart'; import 'package:eatvio_app/core/locator_service.dart'; @@ -170,7 +171,7 @@ class _DevToolsScreenContentState extends State { // Show AlertDialog with error description if (mounted) { showDialog( - context: context, + context: AppRouter.navigatorKey.currentContext!, builder: (context) => AlertDialog( title: const Text('Test Failed'), content: SingleChildScrollView(child: Text(result.error ?? 'No error details.')), @@ -192,10 +193,10 @@ class _DevToolsScreenContentState extends State { // Show AlertDialog with error description if (mounted) { showDialog( - context: context, + context: AppRouter.navigatorKey.currentContext!, builder: (context) => AlertDialog( title: const Text('Test Failed'), - content: SingleChildScrollView(child: Text(e.toString() + '\n' + stack.toString())), + content: SingleChildScrollView(child: Text('$e\n$stack')), actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), diff --git a/lib/features/dev_tools/test_cases.dart b/lib/features/dev_tools/test_cases.dart index 59f92ce3..eb72a1e7 100644 --- a/lib/features/dev_tools/test_cases.dart +++ b/lib/features/dev_tools/test_cases.dart @@ -70,14 +70,14 @@ class CreateRecipeTask implements TestCases { steps: [Step(description: 'desc')], ), ); - } on DioError catch (e) { + } on DioException catch (e) { final res = e.response; if (res != null && (res.statusCode == null || res.statusCode! < 200 || res.statusCode! >= 300)) { return TestResult(false, 'DioError: statusCode=${res.statusCode}\n${res.data}'); } return TestResult(false, e.toString()); } catch (e, stack) { - return TestResult(false, e.toString() + '\n' + stack.toString()); + return TestResult(false, '$e\n$stack'); } return TestResult(true); } @@ -107,7 +107,7 @@ class Test850task implements TestCases { await dietsService.cancelDiet(id: lastChosenDiet?.dietId ?? 0); } catch (e, stack) { log('unexpected error7: $e'); - return TestResult(false, e.toString() + '\n' + stack.toString()); + return TestResult(false, '$e\n$stack'); } await Future.delayed(const Duration(seconds: 3)); } @@ -121,24 +121,24 @@ class Test850task implements TestCases { await dietsService.startDiet(id: diet.id, body: {'date': today.format('yyyy-MM-dd')}); } catch (e, stack) { log('unexpected error2: $e'); - return TestResult(false, e.toString() + '\n' + stack.toString()); + return TestResult(false, '$e\n$stack'); } try { await dietsService.cancelDiet(id: diet.id); } catch (e, stack) { log('unexpected error3: $e'); - return TestResult(false, e.toString() + '\n' + stack.toString()); + return TestResult(false, '$e\n$stack'); } await Future.delayed(const Duration(seconds: 3)); try { await dietsService.startDiet(id: diet.id, body: {'date': tomorrow.format('yyyy-MM-dd')}); } catch (e, stack) { log('unexpected error4: $e'); - return TestResult(false, e.toString() + '\n' + stack.toString()); + return TestResult(false, '$e\n$stack'); } try { await dietsService.cancelDiet(id: diet.id); - } catch (e, stack) { + } catch (e) { log('unexpected error5: $e'); } break; @@ -147,7 +147,7 @@ class Test850task implements TestCases { return TestResult(true); } catch (e, stack) { log('unexpected error6: $e'); - return TestResult(false, e.toString() + '\n' + stack.toString()); + return TestResult(false, '$e\n$stack'); } } } diff --git a/pubspec.yaml b/pubspec.yaml index 7a57ff78..cdc5881d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: eatvio_app description: A new Flutter project. -version: 1.1.14+44 +version: 1.1.15+45 publish_to: 'none' environment: @@ -16,19 +16,19 @@ dependencies: flutter_secure_storage: ^9.2.4 flutter_bloc: ^9.1.1 cached_network_image: ^3.4.1 - flutter_svg: ^2.1.0 + flutter_svg: ^2.2.0 equatable: ^2.0.7 freezed_annotation: ^3.0.0 json_annotation: ^4.9.0 validators: ^3.0.0 path_provider: ^2.1.5 - carousel_slider_plus: ^7.1.0 + carousel_slider_plus: ^7.1.1 flutter_form_builder: ^10.0.1 image_picker: ^1.1.2 flutter_typeahead: ^5.2.0 go_router: ^16.0.0 keyboard_dismisser: ^3.0.0 - retrofit: ^4.4.2 + retrofit: ^4.5.0 get_it: ^8.0.3 dio: ^5.8.0+1 dart_pusher_channels: ^1.2.3 @@ -38,14 +38,14 @@ dependencies: easy_debounce: ^2.0.3 badges: ^3.1.2 google_fonts: ^6.2.1 - syncfusion_flutter_charts: ^30.1.37 - syncfusion_flutter_gauges: ^30.1.37 + syncfusion_flutter_charts: ^30.1.38 + syncfusion_flutter_gauges: ^30.1.38 table_calendar: ^3.2.0 flutter_keyboard_visibility: ^6.0.0 share_plus: ^11.0.0 flutter_html: ^3.0.0 - file_picker: ^10.1.9 - audioplayers: ^6.4.0 + file_picker: ^10.2.0 + audioplayers: ^6.5.0 intl: ^0.20.2 mask_text_input_formatter: ^2.9.0 lottie: ^3.3.1 @@ -54,27 +54,27 @@ dependencies: flutter_rating_bar: ^4.0.1 flutter_image_compress: ^2.4.0 image: ^4.5.4 - dotted_border: ^3.0.1 + dotted_border: ^3.1.0 http: ^1.4.0 flutter_native_splash: ^2.4.6 - webview_flutter: ^4.12.0 - sentry_flutter: ^8.14.2 + webview_flutter: ^4.13.0 + sentry_flutter: ^9.2.0 connectivity_plus: ^6.1.4 visibility_detector: ^0.4.0+2 - firebase_core: ^3.13.1 - firebase_messaging: ^15.2.6 + firebase_core: ^3.15.0 + firebase_messaging: ^15.2.8 http_parser: ^4.1.2 path: ^1.9.1 collection: ^1.19.1 shared_preferences: ^2.5.3 version: ^3.0.2 package_info_plus: ^8.3.0 - device_info_plus: ^11.4.0 + device_info_plus: ^11.5.0 permission_handler: ^12.0.0+1 qr_code_scanner_plus: ^2.0.10+1 dev_dependencies: - build_runner: ^2.4.15 + build_runner: ^2.5.4 freezed: ^3.0.6 json_serializable: ^6.9.5 retrofit_generator: ^9.2.0 @@ -83,7 +83,7 @@ dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^6.0.0 + flutter_lints: ^5.0.0 flutter: uses-material-design: true