This commit is contained in:
dyakonovr 2024-09-18 13:49:29 +04:00
parent 880c076f6b
commit 062bc11a69
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -53,8 +53,8 @@ class _MyHomePageState extends State<MyHomePage> {
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)
],