ResponsiveTable constructor

const ResponsiveTable({
  1. Key? key,
  2. required List<String> columns,
  3. required List<List> rows,
  4. Widget mobileCardBuilder(
    1. BuildContext context,
    2. List row,
    3. List<String> headers
    )?,
  5. List<int>? hiddenColumnsOnMobile,
  6. void onRowTap(
    1. int index,
    2. List row
    )?,
  7. ScreenType tableBreakpoint = ScreenType.mobile,
  8. bool showSortIndicator = false,
  9. int? sortColumnIndex,
  10. bool sortAscending = true,
  11. void onSort(
    1. int columnIndex,
    2. bool ascending
    )?,
  12. Widget? tableHeading,
  13. EdgeInsetsGeometry cardListPadding = const EdgeInsets.all(8),
  14. double cardSpacing = 8.0,
  15. bool horizontalScroll = true,
  16. Decoration? tableDecoration,
  17. bool cardShrinkWrap = true,
  18. ScrollPhysics? cardPhysics,
})

Creates a ResponsiveTable.

Implementation

const ResponsiveTable({
  super.key,
  required this.columns,
  required this.rows,
  this.mobileCardBuilder,
  this.hiddenColumnsOnMobile,
  this.onRowTap,
  this.tableBreakpoint = ScreenType.mobile,
  this.showSortIndicator = false,
  this.sortColumnIndex,
  this.sortAscending = true,
  this.onSort,
  this.tableHeading,
  this.cardListPadding = const EdgeInsets.all(8),
  this.cardSpacing = 8.0,
  this.horizontalScroll = true,
  this.tableDecoration,
  this.cardShrinkWrap = true,
  this.cardPhysics,
});