From c991632142274fec924f42262929e21c6fa34298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Ja=C5=82ocha?= <76820915+mikolaj-jalocha@users.noreply.github.com> Date: Tue, 27 Aug 2024 20:35:57 +0200 Subject: [PATCH] feat: add splash tile on field of studies (#173) --- lib/widgets/wide_tile_card.dart | 47 ++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/lib/widgets/wide_tile_card.dart b/lib/widgets/wide_tile_card.dart index 2927071c..c51ce8e0 100644 --- a/lib/widgets/wide_tile_card.dart +++ b/lib/widgets/wide_tile_card.dart @@ -49,31 +49,36 @@ class WideTileCard extends StatelessWidget { final List? activeShadows; final LinearGradient? activeGradient; final CrossAxisAlignment crossAxisAlignment; + @override Widget build(BuildContext context) { - return GestureDetector( - onTap: onTap, - child: Container( - decoration: BoxDecoration( - gradient: isActive ? activeGradient : null, - color: context.colorTheme.greyLight, + return ClipRRect( + child: Material( + child: InkWell( borderRadius: const BorderRadius.all(WideTileCardConfig.radius), - boxShadow: isActive ? activeShadows : null, - ), - clipBehavior: Clip.antiAlias, - child: Row( - crossAxisAlignment: crossAxisAlignment, - children: [ - Expanded( - child: _TitlesColumn( - title, - subtitle, - secondSubtitle, - isActive: isActive, - ), + onTap: onTap, + child: Ink( + decoration: BoxDecoration( + gradient: isActive ? activeGradient : null, + color: context.colorTheme.greyLight, + borderRadius: const BorderRadius.all(WideTileCardConfig.radius), + boxShadow: isActive ? activeShadows : null, ), - if (trailing != null) trailing!, - ], + child: Row( + crossAxisAlignment: crossAxisAlignment, + children: [ + Expanded( + child: _TitlesColumn( + title, + subtitle, + secondSubtitle, + isActive: isActive, + ), + ), + if (trailing != null) trailing!, + ], + ), + ), ), ), );