Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added scrollPhysics to data_table_2 #290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/src/data_table_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class DataTable2 extends DataTable {
this.horizontalScrollController,
this.isVerticalScrollBarVisible,
this.isHorizontalScrollBarVisible,
this.scrollPhysics,
this.empty,
this.border,
this.smRatio = 0.67,
Expand Down Expand Up @@ -296,6 +297,10 @@ class DataTable2 extends DataTable {
/// Determines whether the horizontal scroll bar is visible, for iOS takes value from scrollbarTheme when null
final bool? isHorizontalScrollBarVisible;

/// Exposes scroll physics of the SingleChildScrollView that could makes data rows vertical scrollable even if the table view is not full.
/// Useful when used in conjunction with [RefreshIndicator]
final ScrollPhysics? scrollPhysics;

/// Placeholder widget which is displayed whenever the data rows are empty.
/// The widget will be displayed below column
final Widget? empty;
Expand Down Expand Up @@ -1074,6 +1079,7 @@ class DataTable2 extends DataTable {
child: SingleChildScrollView(
controller: coreVerticalController,
scrollDirection: Axis.vertical,
physics: scrollPhysics,
child: SingleChildScrollView(
controller: coreHorizontalController,
scrollDirection: Axis.horizontal,
Expand Down
Loading