DataTable constructor
DataTable({
- Key? key,
- required List<
DataColumn> columns, - int? sortColumnIndex,
- bool sortAscending = true,
- ValueSetter<
bool?> ? onSelectAll, - Decoration? decoration,
- MaterialStateProperty<
Color?> ? dataRowColor, - double? dataRowHeight,
- TextStyle? dataTextStyle,
- MaterialStateProperty<
Color?> ? headingRowColor, - Color? fixedColumnsColor,
- Color? fixedCornerColor,
- double? headingRowHeight,
- TextStyle? headingTextStyle,
- CheckboxThemeData? headingCheckboxTheme,
- CheckboxThemeData? datarowCheckboxTheme,
- double? horizontalMargin,
- double? checkboxHorizontalMargin,
- Alignment checkboxAlignment = Alignment.center,
- double? bottomMargin,
- double? columnSpacing,
- bool showHeadingCheckBox = true,
- bool showCheckboxColumn = true,
- bool showBottomBorder = false,
- double? dividerThickness,
- Clip clipBehavior = Clip.none,
- double? minWidth,
- ScrollController? scrollController,
- ScrollController? horizontalScrollController,
- bool? isVerticalScrollBarVisible = false,
- bool? isHorizontalScrollBarVisible = true,
- Widget? empty,
- TableBorder? border,
- double smRatio = 0.67,
- int fixedTopRows = 1,
- int fixedLeftColumns = 0,
- double lmRatio = 1.2,
- Duration sortArrowAnimationDuration = const Duration(milliseconds: 150),
- IconData sortArrowIcon = Icons.arrow_upward,
- Widget? sortArrowBuilder()?,
- BoxDecoration? headingRowDecoration,
- required List<
DataRow> rows,
Implementation
DataTable({
super.key,
required super.columns,
super.sortColumnIndex,
super.sortAscending = true,
super.onSelectAll,
super.decoration,
super.dataRowColor,
this.dataRowHeight,
super.dataTextStyle,
super.headingRowColor,
this.fixedColumnsColor,
this.fixedCornerColor,
super.headingRowHeight,
super.headingTextStyle,
this.headingCheckboxTheme,
this.datarowCheckboxTheme,
super.horizontalMargin,
super.checkboxHorizontalMargin,
this.checkboxAlignment = Alignment.center,
this.bottomMargin,
super.columnSpacing,
this.showHeadingCheckBox = true,
super.showCheckboxColumn = true,
super.showBottomBorder = false,
super.dividerThickness,
super.clipBehavior,
this.minWidth,
this.scrollController,
this.horizontalScrollController,
this.isVerticalScrollBarVisible = false,
this.isHorizontalScrollBarVisible = true,
this.empty,
this.border,
this.smRatio = 0.67,
this.fixedTopRows = 1,
this.fixedLeftColumns = 0,
this.lmRatio = 1.2,
this.sortArrowAnimationDuration = const Duration(milliseconds: 150),
this.sortArrowIcon = Icons.arrow_upward,
this.sortArrowBuilder,
this.headingRowDecoration,
required super.rows,
}) : assert(fixedLeftColumns >= 0),
assert(fixedTopRows >= 0);