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 showHeadingCheckBox = true,
  23. bool showCheckboxColumn = true,
  24. bool showBottomBorder = false,
  25. double? dividerThickness,
  26. Clip clipBehavior = Clip.none,
  27. double? minWidth,
  28. ScrollController? scrollController,
  29. ScrollController? horizontalScrollController,
  30. bool? isVerticalScrollBarVisible,
  31. bool? isHorizontalScrollBarVisible,
  32. Widget? empty,
  33. TableBorder? border,
  34. double smRatio = 0.67,
  35. int fixedTopRows = 1,
  36. int fixedLeftColumns = 0,
  37. double lmRatio = 1.2,
  38. Duration sortArrowAnimationDuration = const Duration(milliseconds: 150),
  39. IconData sortArrowIcon = Icons.arrow_upward,
  40. Widget? sortArrowBuilder(
    1. bool ascending,
    2. bool sorted
    )?,
  41. BoxDecoration? headingRowDecoration,
  42. required List<DataRow> rows,
  43. Color? highlightColumnColor,
  44. int? highlightColumnIndex,
  45. Duration highlightDuration = const Duration(milliseconds: 100),
})

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,
    this.showHeadingCheckBox = true,
    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,
    this.highlightColumnColor,
    this.highlightColumnIndex,
    this.highlightDuration = const Duration(milliseconds: 100)})
    : assert(fixedLeftColumns >= 0),
      assert(fixedTopRows >= 0);