From 254f586fc6ddb4dbd79a26f9b43fc159db85594c Mon Sep 17 00:00:00 2001 From: Vitor Pires Date: Tue, 7 Jan 2025 16:38:22 +0000 Subject: [PATCH] feat: update generic card --- packages/uni_ui/lib/cards/generic_card.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/uni_ui/lib/cards/generic_card.dart b/packages/uni_ui/lib/cards/generic_card.dart index c9501cc16..9ba8b6c65 100644 --- a/packages/uni_ui/lib/cards/generic_card.dart +++ b/packages/uni_ui/lib/cards/generic_card.dart @@ -19,7 +19,7 @@ class GenericCard extends StatelessWidget { final Color? color; final Color? shadowColor; final double? borderRadius; - final Function? onClick; + final VoidCallback? onClick; final Widget? child; final String tooltip; @@ -58,7 +58,7 @@ class GenericCard extends StatelessWidget { child: Padding( padding: padding ?? const EdgeInsets.all(10), child: GestureDetector( - onTap: onClick != null ? () => onClick!() : null, + onTap: onClick, child: child, ), ),