DataTable2 constructor

DataTable2({
  1. Key? key,
  2. required List<DataColumn> columns,
  3. int? sortColumnIndex,
  4. bool sortAscending = true,
  5. ValueSetter<bool?>? onSelectAll,
  6. Decoration? decoration,
  7. MaterialStateProperty<Color?>? dataRowColor,
  8. double? dataRowHeight,
  9. TextStyle? dataTextStyle,
  10. MaterialStateProperty<Color?>? headingRowColor,
  11. Color? fixedColumnsColor,
  12. Color? fixedCornerColor,
  13. double? headingRowHeight,
  14. TextStyle? headingTextStyle,
  15. CheckboxThemeData? headingCheckboxTheme,
  16. CheckboxThemeData? datarowCheckboxTheme,
  17. double? horizontalMargin,
  18. double? checkboxHorizontalMargin,
  19. Alignment checkboxAlignment = Alignment.center,
  20. double? bottomMargin,
  21. double? columnSpacing,
  22. bool showCheckboxColumn = true,
  23. bool showBottomBorder = false,
  24. double? dividerThickness,
  25. Clip clipBehavior = Clip.none,
  26. double? minWidth,
  27. ScrollController? scrollController,
  28. ScrollController? horizontalScrollController,
  29. bool? isVerticalScrollBarVisible,
  30. bool? isHorizontalScrollBarVisible,
  31. Widget? empty,
  32. TableBorder? border,
  33. double smRatio = 0.67,
  34. int fixedTopRows = 1,
  35. int fixedLeftColumns = 0,
  36. double lmRatio = 1.2,
  37. Duration sortArrowAnimationDuration = const Duration(milliseconds: 150),
  38. IconData sortArrowIcon = Icons.arrow_upward,
  39. Widget? sortArrowBuilder(
    1. bool ascending,
    2. bool sorted
    )?,
  40. BoxDecoration? headingRowDecoration,
  41. required List<DataRow> rows,
})

Implementation

DataTable2({
  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,
  super.showCheckboxColumn = true,
  super.showBottomBorder = false,
  super.dividerThickness,
  super.clipBehavior,
  this.minWidth,
  this.scrollController,
  this.horizontalScrollController,
  this.isVerticalScrollBarVisible,
  this.isHorizontalScrollBarVisible,
  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);