fixed errors

This commit is contained in:
Username1548
2025-02-03 15:36:01 +07:00
parent e7ea7b3055
commit 77e7b6c31f

View File

@@ -75,7 +75,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
children: [ children: [
_iconButton('assets/icons/clock.svg', widget.recipes.cookingTime.toString() + ' минут'), _iconButton('assets/icons/clock.svg', widget.recipes.cookingTime.toString() + ' минут'),
SizedBox(width: 8), 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), SizedBox(width: 8),
_iconButton('assets/icons/calories.svg', widget.recipes.calories.toStringAsFixed(0) + ' ккал'), _iconButton('assets/icons/calories.svg', widget.recipes.calories.toStringAsFixed(0) + ' ккал'),
], ],
@@ -87,7 +87,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 12), padding: const EdgeInsets.symmetric(horizontal: 12),
child: Text( child: Text(
widget.recipes.title, widget.recipes.title ?? '',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.black87, color: Colors.black87,