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, bool selectAllInHeader = 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 = false, bool showTopBorder = true, bool embedded = false, bool showFooter = true, bool isFilterBarRounded = true, bool hoistFilterBarToShell = false, 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, TextStyle? titleStyle, Color? titleBackgroundColor, List<Widget> titleActions = const [], Color? primaryColor, bool fillHeight = false, bool infiniteScroll = false, ScrollController? pageScrollController, CLTableStyle? style, 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
embedded bool
Se true la tabella NON disegna la propria card (sfondo/ombra/bordo/raggio): pensata per essere annidata in un CLContainer che fornisce gia' la superficie.
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
fillHeight bool
Se true la tabella riempie l'altezza del parent (che DEVE essere bounded, es. dentro un Expanded): filter bar, header e footer restano fissi e scorrono solo le righe. Se false (default) la tabella è alta quanto il contenuto e scorre col parent.
final
hashCode int
The hash code for this object.
no setterinherited
A custom widget to build in the footer, aligned to the left.
final
hoistFilterBarToShell bool
Opt-in: su mobile (compact) e con un CLShellScope antenato, la filter bar non si renderizza inline ma pubblica i suoi controlli nell'area contestuale dello shell (riga alta sopra la bottom bar). Default false → comportamento invariato per ogni tabella esistente (zero blast radius).
final
idGetter ModelIdGetter<TResultId, TResult>
A function that returns the id of an item.
final
infiniteScroll bool
Se true abilita l'infinite scroll: la lista possiede lo scroll (come fillHeight) e carica la pagina successiva quando ci si avvicina al fondo (nextPage(isInfiniteScroll: true) → append), con loader in coda e footer di paginazione nascosto. Il parent DEVE dare un'altezza bounded alla tabella (es. Expanded). Opt-in su tutti i breakpoint.
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
pageScrollController ScrollController?
ScrollController della PAGINA, per il caso "scroll della pagina, non della tabella" (infiniteScroll senza fillHeight). Se fornito, la tabella gestisce internamente l'auto-fill (carica finché il viewport è pieno) e il load a fine scroll: la pagina passa solo il controller, niente plumbing manuale.
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
selectAllInHeader bool
Mostra il checkbox "seleziona tutti" nell'header. Default true. Se false resta lo slot (allineamento) ma niente select-all: la selezione avviene solo per-riga. Le checkbox di riga restano sempre attive con rowsSelectable.
final
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
style CLTableStyle?
Override colori per-istanza (vedi CLTableStyle). Null -> token CLTheme.
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
titleActions List<Widget>
Azioni opzionali mostrate nella STESSA riga del titolo, allineate a destra, sopra la filter bar/ricerca. L'header del titolo compare anche se è valorizzato solo questo (senza title/titleWidget).
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
titleStyle TextStyle?
Override stile del title. Default theme.heading2.
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