PagedDataTable<TKey extends Comparable, TResultId extends Comparable, TResult extends Object> class

A paginated DataTable that allows page caching and filtering TKey is the type of the page token TResult is the type of data the data table will show.

Inheritance
Available extensions

Constructors

PagedDataTable({Future downloadPage({Map<String, dynamic>? orderBy, Map<String, dynamic>? searchBy})?, String? downloadButtonText, IconData? downloadButtonIcon, required Future<(List<TResult>, Pagination?)> fetchPage({Map<String, dynamic>? orderBy, int? page, int? perPage, Map<String, dynamic>? searchBy}), required TKey initialPage, required List<BaseTableColumn<TResult>> columns, required ModelIdGetter<TResultId, TResult> idGetter, TextTableFilter? mainFilter, List<TableFilter>? extraFilters, List<Widget> mainMenus = const [], List<TableExtraMenu<Object>> extraMenus = const [], PagedDataTableController<TKey, TResultId, TResult>? controller, Widget? header, PagedDataTableThemeData? theme, List<int>? pageSizes, int? initialPageSize, ErrorBuilder? errorBuilder, WidgetBuilder? noItemsFoundBuilder, bool rowsSelectable = true, CustomRowBuilder<TResult>? customRowBuilder, Stream? refreshListener, dynamic onItemTap(TResult)?, List<TableAction<TResult>> tableActions = const [], List<TableAction<TResult>> actionsBuilder(TResult item)?, bool isFooterVisible = true, bool isFilterBarVisible = true, bool isInSnippet = false, dynamic actionsTitle(TResult)?, bool showBorder = true, bool showTopBorder = true, bool showFooter = true, bool isFilterBarRounded = true, bool showShimmerLoading = true, Widget expandedRowBuilder(BuildContext context, TResult item)?, Future<void> onRowExpanded(TResult item)?, List<Widget> selectionActionsBuilder(BuildContext context, int selectedCount, List<TResult> selectedItems)?, String? title, Widget? titleWidget, Widget? titleIcon, Color? titleBackgroundColor, Color? primaryColor, Key? key})
const

Properties

actionsBuilder → List<TableAction<TResult>> Function(TResult item)?
A function that builds table actions based on the current item
final
actionsTitle → dynamic Function(TResult)?
final
columns → List<BaseTableColumn<TResult>>
The list of columns to display.
final
controller → PagedDataTableController<TKey, TResultId, TResult>?
A custom controller used to programatically control the table.
final
customRowBuilder → CustomRowBuilder<TResult>?
A custom builder that builds a row.
final
downloadButtonIcon → IconData?
final
downloadButtonText → String?
final
downloadPage → Future Function({Map<String, dynamic>? orderBy, Map<String, dynamic>? searchBy})?
final
errorBuilder → ErrorBuilder?
A custom builder that display any error.
final
expandedRowBuilder → Widget Function(BuildContext context, TResult item)?
Builder opzionale per mostrare contenuto espanso sotto la riga
final
extraFilters → List<TableFilter>?
The list of filters to show.
final
extraMenus → List<TableExtraMenu<Object>>
A custom menu tooltip to show in the filter bar.
final
fetchPage → Future<(List<TResult>, Pagination?)> Function({Map<String, dynamic>? orderBy, int? page, int? perPage, Map<String, dynamic>? searchBy})
The callback that gets executed when a page is fetched.
final
hashCode → int
The hash code for this object.
no setterinherited
A custom widget to build in the footer, aligned to the left.
final
idGetter → ModelIdGetter<TResultId, TResult>
A function that returns the id of an item.
final
initialPage → TKey
The initial page to fetch.
final
initialPageSize → int?
final
isFilterBarRounded → bool
final
isFilterBarVisible → bool
final
isFooterVisible → bool
final
isInSnippet → bool
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainFilter → TextTableFilter?
final
final
noItemsFoundBuilder → WidgetBuilder?
A custom builder that builds when no item is found.
final
onItemTap → dynamic Function(TResult)?
final
onRowExpanded → Future<void> Function(TResult item)?
Callback chiamata quando una riga viene espansa
final
pageSizes → List<int>?
final
primaryColor → Color?
Colore primario applicato agli elementi interattivi della tabella (indicatore di sort, riga selezionata, checkbox, hover, badge filtri, toolbar di selezione, empty state). Se null, viene usato CLTheme.of(context).primary.
final
refreshListener → Stream?
A stream to listen and refresh the table when any update is received.
final
rowsSelectable → bool
Indicates if the table allows the user to select rows.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectionActionsBuilder → List<Widget> Function(BuildContext context, int selectedCount, List<TResult> selectedItems)?
Builder opzionale per le azioni nella toolbar di selezione (appare quando almeno una riga è selezionata). Ritorna solo i widget delle azioni: badge "X selezionati" e "Deseleziona tutto" vengono gestiti internamente dalla tabella.
final
showBorder → bool
final
showFooter → bool
final
showShimmerLoading → bool
final
showTopBorder → bool
final
tableActions → List<TableAction<TResult>>
final
theme → PagedDataTableThemeData?
A custom theme to apply only to this DataTable instance.
final
title → String?
Titolo opzionale mostrato nell'header della tabella (stessa grafica di CLContainer).
final
titleBackgroundColor → Color?
Colore di sfondo dell'header del titolo (applicato con alpha 0.08).
final
titleIcon → Widget?
Icona opzionale mostrata a sinistra del title. Ignorata se titleWidget è valorizzato.
final
titleWidget → Widget?
Widget custom da mostrare al posto di title. Ha precedenza su title e titleIcon.
final

Methods

animateOnActionTrigger(AnimationInfo animationInfo, {bool hasBeenTriggered = false}) → Widget

Available on Widget, provided by the AnimatedWidgetExtension extension

animateOnPageLoad(AnimationInfo animationInfo) → Widget

Available on Widget, provided by the AnimatedWidgetExtension extension

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited