From 062bc11a69265da8a1bc6004f486e89b1a83f97e Mon Sep 17 00:00:00 2001 From: dyakonovr Date: Wed, 18 Sep 2024 13:49:29 +0400 Subject: [PATCH] final --- lib/presentation/home_page/card.dart | 2 +- lib/presentation/home_page/home_page.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/presentation/home_page/card.dart b/lib/presentation/home_page/card.dart index 817b601..a423bb5 100644 --- a/lib/presentation/home_page/card.dart +++ b/lib/presentation/home_page/card.dart @@ -13,7 +13,7 @@ class _Card extends StatefulWidget { {required this.name, required this.price, this.onLike, this.onTap}); factory _Card.fromData( - CardData data, OnLikeFunction? onLike, VoidCallback? onTap) => + CardData data, {OnLikeFunction? onLike, VoidCallback? onTap}) => _Card( name: data.name, price: data.price, diff --git a/lib/presentation/home_page/home_page.dart b/lib/presentation/home_page/home_page.dart index de14891..783f7ad 100644 --- a/lib/presentation/home_page/home_page.dart +++ b/lib/presentation/home_page/home_page.dart @@ -53,8 +53,8 @@ class _MyHomePageState extends State { children: [ _Card.fromData( cardData, - (String text) => _showSnackBar(context, text), - () => _navigateToDetailsPage(context, cardData), + onTap: () => _navigateToDetailsPage(context, cardData), + onLike: (String text) => _showSnackBar(context, text), ), const SizedBox(height: 20) ],