MyTableView<T extends BaseModel> constructor

const MyTableView<T extends BaseModel>({
  1. Key? key,
  2. required ValueChanged<int> onNext,
  3. required ValueChanged<int> onPrevious,
  4. String? title,
  5. String? subTitle,
  6. Widget? header,
  7. PaginatedModel<BaseModel>? model,
  8. ValueChanged<T>? onTap,
  9. ValueChanged<T>? onMenuSelected,
  10. ValueChanged<T>? onSelectedItem,
  11. ValueChanged<bool?>? onSelectAll,
  12. VoidCallback? onAdd,
  13. List actions = const [],
  14. List<T> selectedItems = const [],
  15. Widget? actionOnselectedMany,
  16. AlignmentGeometry paginateAlignment = Alignment.bottomLeft,
  17. WidgetStateProperty<Color?>? dataRowColor,
  18. double? dataRowMinHeight,
  19. double? dataRowMaxHeight = defaultRowHeight,
  20. bool showCheckboxColumn = true,
  21. bool showBottomBorder = false,
  22. bool enableInternalSorting = true,
  23. bool showScrollbar = true,
  24. double scrollbarThickness = 8.0,
  25. Radius? scrollbarRadius,
  26. String? buttonTitle,
})

Implementation

const MyTableView({
  super.key,
  // Props obrigatórias
  required this.onNext,
  required this.onPrevious,

  // Props opcionais - básicas
  this.title,
  this.subTitle,
  this.header,
  this.model,

  // Props opcionais - interatividade
  this.onTap,
  this.onMenuSelected,
  this.onSelectedItem,
  this.onSelectAll,
  this.onAdd,

  // Props opcionais - ações e seleção
  this.actions = const [],
  this.selectedItems = const [],
  this.actionOnselectedMany,

  // Props opcionais - estilo e comportamento
  this.paginateAlignment = Alignment.bottomLeft,
  this.dataRowColor,
  this.dataRowMinHeight,
  this.dataRowMaxHeight = defaultRowHeight,
  this.showCheckboxColumn = true,
  this.showBottomBorder = false,
  this.enableInternalSorting = true,
  this.showScrollbar = true,
  this.scrollbarThickness = 8.0,
  this.scrollbarRadius,
  this.buttonTitle,
});