AdvancedTableSliver class

A widget that displays an advanced table with customizable headers, rows, and actions. This is the main widget you'll use to create your table.

Inheritance

Constructors

AdvancedTableSliver.new({Key? key, required Widget headerBuilder(BuildContext, HeaderBuilder), required List<Widget> rowElementsBuilder(BuildContext, RowBuilderParams), required List items, required ValueNotifier<bool> isLoadingAll, ValueNotifier<bool>? isLoadingMore, Widget? onEmptyState, BoxDecoration? headerDecoration, EdgeInsets? innerHeaderPadding, required Widget fullLoadingPlaceHolder, Widget? loadingMorePlaceHolder, EdgeInsets? elementsPadding, BoxDecoration? rowElementsDecoration, EdgeInsets? innerRowElementsPadding, TextStyle? headerTextStyle, EdgeInsets? outterRowsPadding, BoxDecoration rowDecorationBuilder(int, bool)?, EdgeInsets? outterHeaderPadding, required List headerItems, List? actions, Widget actionBuilder(BuildContext, ActionParamBuilder)?, bool addSpacerToActions = true, void onRowTap(int)?, Widget rowBuilder(BuildContext, int, Widget, bool)?})
const

Properties

actionBuilder Widget Function(BuildContext, ActionParamBuilder)?
Builder function for creating action widgets. This function is called for each action defined in actions. It receives the BuildContext and an ActionParamBuilder object.
final
actions List?
List of actions to be displayed for each row. This is primarily used for calculating widths and determining how many action widgets to create. The actual widgets are built by actionBuilder.
final
addSpacerToActions bool
Whether to add a spacer before the action buttons. This can improve visual separation.
final
elementsPadding EdgeInsets?
Padding for table elements (around the entire table content).
final
fullLoadingPlaceHolder Widget
Widget to display when the entire table is loading (isLoadingAll is true).
final
hashCode int
The hash code for this object.
no setterinherited
headerBuilder Widget Function(BuildContext, HeaderBuilder)
Builder function for creating header widgets. This function is called for each item in headerItems. It receives the BuildContext and a HeaderBuilder object.
final
headerDecoration BoxDecoration?
Decoration for the header section (the entire header row).
final
headerItems List
List of header items to be displayed. This is a simple list of data (usually Strings) that represent the header text for each column.
final
headerTextStyle TextStyle?
Text style for the header text.
final
innerHeaderPadding EdgeInsets?
Padding inside the header (around the header cells).
final
innerRowElementsPadding EdgeInsets?
Padding inside the row elements (around the cells within each row).
final
isLoadingAll ValueNotifier<bool>
Notifier for tracking the loading state of the entire table. When true, the fullLoadingPlaceHolder is displayed.
final
isLoadingMore ValueNotifier<bool>?
Notifier for tracking the loading state of additional items (e.g., for pagination). When true, the loadingMorePlaceHolder is displayed.
final
items List
List of items (your data) to be displayed in the table. This is your main data source. Each item in this list corresponds to a row in the table.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingMorePlaceHolder Widget?
Widget to display when loading more items (isLoadingMore is true).
final
onEmptyState Widget?
Widget to display when the table is empty (i.e., items is empty).
final
onRowTap → void Function(int)?
Callback function when a row is tapped. The int parameter is the index of the tapped row.
final
outterHeaderPadding EdgeInsets?
Padding outside the header (above the header row).
final
outterRowsPadding EdgeInsets?
Padding outside the rows (around the entire list of rows).
final
rowBuilder Widget Function(BuildContext, int, Widget, bool)?
the builder of the row for more controle of the row, for example you can add animations on x row or all rows you get the index of the row and the row itself and the is hover this builder overwrite the internal builder
final
rowDecorationBuilder BoxDecoration Function(int, bool)?
Builder function for row decorations. This function is called for each row and allows you to dynamically style the row based on its index and whether it's being hovered over.
final
rowElementsBuilder List<Widget> Function(BuildContext, RowBuilderParams)
Builder function for creating the row elements (the cells within each row). This function is called for each item in items. It receives the BuildContext and a RowBuilderParams object, and returns a list of Widgets, one for each column in the row (excluding actions).
final
rowElementsDecoration BoxDecoration?
Decoration for the row elements (applied to each row).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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