ReorderableTable class
Reorderable (drag and drop) version of Table, a widget that displays its children in a two-dimensional grid.
The difference between table and list is that cells in a table are horizontally aligned, whereas in a list, each item can have children but they are not aligned with children in another item. Making a row draggable requires cells to be contained in a single widget. This isn't achievable with Table or GridView widget since their children are laid out as cells of widget instead of rows of widget.
Cells of each row must be children of ReorderableTableRow and each ReorderableTableRow must have a key.
See also:
- ReorderableTableRow, which is the container of a row of cells.
- Table, which uses the table layout algorithm for its children.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ReorderableTable
Constructors
-
ReorderableTable({required ReorderCallback onReorder, List<
ReorderableTableRow> children = const <ReorderableTableRow>[], Map<int, TableColumnWidth> ? columnWidths, TableColumnWidth defaultColumnWidth = const FlexColumnWidth(1.0), TextDirection? textDirection, TableBorder? border, TableCellVerticalAlignment defaultVerticalAlignment = TableCellVerticalAlignment.top, TextBaseline? textBaseline, Widget? header, DecorateDraggableFeedback? decorateDraggableFeedback, NoReorderCallback? onNoReorder, Duration? reorderAnimationDuration, Duration? scrollAnimationDuration, bool ignorePrimaryScrollController = false, bool needsLongPressDraggable = true, Key? key, Color? borderColor}) - Creates a reorderable table.
Properties
- border → TableBorder?
-
The style to use when painting the boundary and interior divisions of the table.
final
- borderColor → Color?
-
final
-
children
→ List<
ReorderableTableRow> -
The rows of the table.
final
-
columnWidths
→ Map<
int, TableColumnWidth> ? -
How the horizontal extents of the columns of this table should be determined.
final
- decorateDraggableFeedback → DecorateDraggableFeedback?
-
final
- defaultColumnWidth → TableColumnWidth
-
How to determine with widths of columns that don't have an explicit sizing algorithm.
final
- defaultVerticalAlignment → TableCellVerticalAlignment
-
How cells that do not explicitly specify a vertical alignment are aligned vertically.
final
-
Non-reorderable widget at top of the table. Cells in footer also affects
alignment of columns.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Non-reorderable widget at top of the table. Cells in header also affects
alignment of columns.
final
- ignorePrimaryScrollController → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- needsLongPressDraggable → bool
-
final
- onNoReorder → NoReorderCallback?
-
final
- onReorder → ReorderCallback
-
Called when a child is dropped into a new position to shuffle the
children.
final
- reorderAnimationDuration → Duration?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollAnimationDuration → Duration?
-
final
- textBaseline → TextBaseline?
-
The text baseline to use when aligning rows using TableCellVerticalAlignment.baseline.
final
- textDirection → TextDirection?
-
The direction in which the columns are ordered.
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
-
defaultDecorateDraggableFeedback(
BuildContext feedbackContext, Widget draggableFeedback) → Widget -
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