feat: use adaptive_scrollbar instead of scrollbar; add uuid to GestureProp.

This commit is contained in:
2021-11-02 19:19:13 +08:00
parent bc2b514392
commit 76b6c14553
4 changed files with 87 additions and 54 deletions
+3
View File
@@ -420,6 +420,7 @@ class DDataCell {
/// * <https://material.io/design/components/data-tables.html>
class DDataTable extends StatefulWidget {
final Color headerBackgroundColor;
final ScrollController verticalScrollController;
/// Creates a widget describing a data table.
///
@@ -466,6 +467,7 @@ class DDataTable extends StatefulWidget {
required this.rows,
this.checkboxHorizontalMargin,
required this.headerBackgroundColor,
required this.verticalScrollController,
}) : assert(columns != null),
assert(columns.isNotEmpty),
assert(sortColumnIndex == null || (sortColumnIndex >= 0 && sortColumnIndex < columns.length)),
@@ -1033,6 +1035,7 @@ class _DDataTableState extends State<DDataTable> {
padding: EdgeInsets.only(top: _headersRect?.last.height ?? 0),
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
controller: widget.verticalScrollController,
child: Transform.translate(
offset: Offset(0, -(_headersRect?.last.height ?? 0)),
child: Table(