Fluent2Table class
Fluent 2's Table (and DataGrid's look): a header row in body1 over rows 44 tall with a hairline under each, cells 8 in at their sides, each a Fluent2TableCell layout. A Fluent2TableColumn.sortable header is a press that asks onSort for its column, the sorted one wearing its 12 arrow. With selected set the rows are selectable: Fluent's checkbox in a 44 column at the start (the header's selects them all), a selected row lit by selectionAppearance, a change told through onSelectionChanged. Rows step through the subtle fill's hover and pressed steps. When the columns need more room than there is (a phone) the table scrolls sideways. Read as rows of cells, sorting and selection said.
Fluent2Table(columns: const [Fluent2TableColumn('Name', flex: 2), Fluent2TableColumn('Modified')], rows: [Fluent2TableRow(cells: [Fluent2TableCell('Q3 plan.docx'), Fluent2TableCell('2h ago')])])
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- Fluent2Table
Constructors
-
Fluent2Table({required List<
Fluent2TableColumn> columns, required List<Fluent2TableRow> rows, int? sortColumn, Fluent2SortDirection sortDirection = Fluent2SortDirection.ascending, ValueChanged<int> ? onSort, Set<int> ? selected, ValueChanged<Set< ? onSelectionChanged, Fluent2TableSize size = Fluent2TableSize.medium, Fluent2TableSelectionAppearance selectionAppearance = Fluent2TableSelectionAppearance.neutral, String? label, Key? key})int> > -
A table of
rowsundercolumns.const
Properties
-
columns
→ List<
Fluent2TableColumn> -
The columns, in order.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
What a screen reader calls the table.
final
-
onSelectionChanged
→ ValueChanged<
Set< ?int> > -
Told the rows selected after a change; null draws the selection
disabled.
final
-
onSort
→ ValueChanged<
int> ? -
Asked to sort by the column pressed.
final
-
rows
→ List<
Fluent2TableRow> -
The rows, in order.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selected
→ Set<
int> ? -
The selected rows' indexes; set to make the rows selectable.
final
- selectionAppearance → Fluent2TableSelectionAppearance
-
The fill a selected row wears.
final
- size → Fluent2TableSize
-
Fluent's
size: the rows' height.final - sortColumn → int?
-
The sorted column's index.
final
- sortDirection → Fluent2SortDirection
-
Which way the sorted column runs.
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.
override
-
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
Static Methods
-
headerHeightOf(
BuildContext context) → double -
The heading row's height at
context: 32 on the desktop, a target (44, 48 under a finger) elsewhere. -
selectionWidthOf(
BuildContext context) → double -
The selection column's width at
context: selectionWidth, a whole target (48) under a finger.
Constants
- selectionWidth → const double
-
The selection column's width (Fluent's
CELL_WIDTH).