ScalableDataTable class
ScalableDataTable uses builder property to only build the active rows at the moment. Similar to ListView.builder, it improves the performance in tables with many rows.
The header will be visible at all times and the rows will get the rest of the available space.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ScalableDataTable
Constructors
- ScalableDataTable({required Widget rowBuilder(BuildContext, int), required Widget header, required int itemCount, required Widget emptyBuilder(BuildContext), double? rowHeight, Widget loadingBuilder(BuildContext)?, TextStyle? textStyle, ScrollController? scrollController, double? minWidth, Key? key})
Properties
- emptyBuilder → Widget Function(BuildContext)
-
This will be built instead of the rows if itemCount is 0.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget
-
It's recommended to use ScalableTableHeader
final
- horizontalScrollController → ScrollController
-
final
- itemCount → int
-
Use -1 for loading
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingBuilder → (Widget Function(BuildContext)?)
-
Loading indicator then itemCount is -1. If null,
CircularProgressIndicator will be shown.
final
- minWidth → double?
-
If the availabel width is smaller than minWidth, a horizontal
scrollable list will be created to ensure that the rows and columns have
at least minWidth of available width.
final
- rowBuilder → Widget Function(BuildContext, int)
-
It's recommended to use ScalableTableRow
final
- rowHeight → double?
-
If non-null, forces the children to have the given extent vertically.
Specifying an
itemExtent
is more efficient than letting the children determine their own extent because the scrolling machinery can make use of the foreknowledge of the children's extent to save work, for example when the scroll position changes drastically.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
final
- textStyle → TextStyle?
-
final
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}) → 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