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. WidgetStateProperty<Color?>? dataRowColor,
  8. double? dataRowHeight,
  9. TextStyle? dataTextStyle,
  10. WidgetStateProperty<Color?>? headingRowColor,
  11. Color? fixedColumnsColor,
  12. Color? fixedCornerColor,
  13. double? headingRowHeight,
  14. TextStyle? headingTextStyle,
  15. double? horizontalMargin,
  16. double? checkboxHorizontalMargin,
  17. double? bottomMargin,
  18. double? columnSpacing,
  19. bool showCheckboxColumn = true,
  20. bool showBottomBorder = false,
  21. double? dividerThickness,
  22. double? minWidth,
  23. ScrollController? scrollController,
  24. Widget? empty,
  25. TableBorder? border,
  26. double smRatio = 0.67,
  27. int fixedTopRows = 1,
  28. int fixedLeftColumns = 0,
  29. double lmRatio = 1.2,
  30. Duration sortArrowAnimationDuration = const Duration(milliseconds: 150),
  31. IconData sortArrowIcon = Icons.arrow_upward,
  32. required List<DataRow> rows,
})

Implementation

DataTable2({
  super.key,
  required super.columns,
  super.sortColumnIndex,
  super.sortAscending = true,
  super.onSelectAll,
  super.decoration,
  super.dataRowColor,
  super.dataRowHeight,
  super.dataTextStyle,
  super.headingRowColor,
  this.fixedColumnsColor,
  this.fixedCornerColor,
  super.headingRowHeight,
  super.headingTextStyle,
  super.horizontalMargin,
  super.checkboxHorizontalMargin,
  this.bottomMargin,
  super.columnSpacing,
  super.showCheckboxColumn = true,
  super.showBottomBorder = false,
  super.dividerThickness,
  this.minWidth,
  this.scrollController,
  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,
  required super.rows,
})  : assert(fixedLeftColumns >= 0),
      assert(fixedTopRows >= 0) {
  // // Fix for #111, syncrhonize scroll position for left fixed column with core
  // // Works fine if there's scrollCongtroller provided externally, allows to avoid jumping
  // _leftColumnVerticalContoller = ScrollController(
  //     initialScrollOffset: _coreVerticalController.positions.isNotEmpty
  //         ? _coreVerticalController.offset
  //         : 0.0);
}