From 626be6fd132f0ed2bd0cd65d24fe883092434aea Mon Sep 17 00:00:00 2001 From: Charly Boudringhin Date: Wed, 13 Mar 2024 19:39:18 +0100 Subject: [PATCH] The shape of the InkWell hover can match the shape of the DataRow2 decoration --- lib/src/data_table_2.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/data_table_2.dart b/lib/src/data_table_2.dart index 0067e74..7743189 100644 --- a/lib/src/data_table_2.dart +++ b/lib/src/data_table_2.dart @@ -465,6 +465,7 @@ class DataTable2 extends DataTable { Widget _buildDataCell( {required BuildContext context, + required Decoration? decoration, required EdgeInsetsGeometry padding, required double? specificRowHeight, required Widget label, @@ -556,6 +557,9 @@ class DataTable2 extends DataTable { onRowSecondaryTapDown != null) { // row level label = TableRowInkWell( + borderRadius: decoration is BoxDecoration + ? (decoration.borderRadius as BorderRadius?) ?? BorderRadius.zero + : BorderRadius.zero, onTap: onRowTap ?? onSelectChanged, onDoubleTap: onRowDoubleTap, onLongPress: onRowLongPress, @@ -862,6 +866,7 @@ class DataTable2 extends DataTable { final DataCell cell = row.cells[dataColumnIndex]; var c = _buildDataCell( + decoration: row is DataRow2 ? row.decoration : null, context: context, padding: padding, specificRowHeight: