GroupSpec class

One level of grouping.

Constructors

GroupSpec(String field, {SortDirection direction = SortDirection.ascending, NullsPosition nulls = NullsPosition.last, Object? keyOf(Object? value)?, String labelOf(Object? key)?, String blankLabel = '(blank)'})
const

Properties

blankLabel → String
Label for the group of rows whose value is null.
final
direction → SortDirection
Order of the group headers themselves.
final
field → String
final
fingerprint → String
A stable string identifying which buckets this spec produces, for use as a cache key.
no setter
hashCode → int
The hash code for this object.
no setteroverride
keyOf → Object? Function(Object? value)?
Buckets a raw value into a group key, for grouping by something coarser than the stored value (a date's month, a number's decade).
final
labelOf → String Function(Object? key)?
Renders a group key as a header label.
final
nulls → NullsPosition
Where the blank group lands relative to the rest.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

keyFor(Object? value) → Object?
labelFor(Object? key) → String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restore({Object? keyOf(Object? value)?, String labelOf(Object? key)?, String? blankLabel}) → GroupSpec
This spec with the bucketing functions supplied, for restoring a saved view whose JSON could not carry them.
toJson() → Map<String, Object?>
JSON for a saved view.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(Map<String, Object?> json) → GroupSpec
Rebuilds a spec produced by toJson.