TCrudConfig<T, K> constructor

const TCrudConfig<T, K>({
  1. Future<bool> canView(
    1. T
    )?,
  2. Future<bool> canEdit(
    1. T
    )?,
  3. Future<bool> canDelete(
    1. T
    )?,
  4. Future<bool> canArchive(
    1. T
    )?,
  5. Future<bool> canRestore(
    1. T
    )?,
  6. String addButtonText = 'Add New',
  7. List<TTab<int>> tabs = const [TTab(text: "Active", value: 0), TTab(text: "Archive", value: 1)],
  8. List<TCrudTableContent<T, K>> tabContents = const [],
  9. String searchPlaceholder = 'Search...',
  10. bool showActions = true,
  11. int itemsPerPage = 0,
  12. List<int> itemsPerPageOptions = const [5, 10, 15, 25, 50],
  13. List<TCrudCustomAction<T>> activeActions = const [],
  14. List<TCrudCustomAction<T>> archiveActions = const [],
  15. List<Widget> topBarActions = const [],
})

Implementation

const TCrudConfig({
  this.canView,
  this.canEdit,
  this.canDelete,
  this.canArchive,
  this.canRestore,
  this.addButtonText = 'Add New',
  this.tabs = const [TTab(text: "Active", value: 0), TTab(text: "Archive", value: 1)],
  this.tabContents = const [],
  this.searchPlaceholder = 'Search...',
  this.showActions = true,
  this.itemsPerPage = 0,
  this.itemsPerPageOptions = const [5, 10, 15, 25, 50],
  this.activeActions = const [],
  this.archiveActions = const [],
  this.topBarActions = const [],
});