From 77e7b6c31f30a7a79be7cce2d6aaed2c4bc6298d Mon Sep 17 00:00:00 2001 From: Username1548 Date: Mon, 3 Feb 2025 15:36:01 +0700 Subject: [PATCH] fixed errors --- lib/features/feed/presentation/widgets/recipes_widget.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/features/feed/presentation/widgets/recipes_widget.dart b/lib/features/feed/presentation/widgets/recipes_widget.dart index d410793a..16681a77 100644 --- a/lib/features/feed/presentation/widgets/recipes_widget.dart +++ b/lib/features/feed/presentation/widgets/recipes_widget.dart @@ -75,7 +75,7 @@ class _RecipesWidgetState extends State { children: [ _iconButton('assets/icons/clock.svg', widget.recipes.cookingTime.toString() + ' минут'), SizedBox(width: 8), - _iconButton('assets/icons/steps.svg', widget.recipes.steps.length.toString() + ' этапов'), + _iconButton('assets/icons/steps.svg', '${widget.recipes.steps?.length.toString()}' + ' этапов'), SizedBox(width: 8), _iconButton('assets/icons/calories.svg', widget.recipes.calories.toStringAsFixed(0) + ' ккал'), ], @@ -87,7 +87,7 @@ class _RecipesWidgetState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 12), child: Text( - widget.recipes.title, + widget.recipes.title ?? '', style: TextStyle( fontWeight: FontWeight.w600, color: Colors.black87,