FitGridColumnState<T> class

Column order, visibility and user-applied widths.

Deliberately separate from FitGridDataState: dragging a column wider must not invalidate the row view, and sorting must not re-measure widths. That separation is the whole reason the controller is a cluster of small notifiers rather than one object with a single notifyListeners.

Inheritance

Constructors

FitGridColumnState({List<FitGridColumn<T>> columns = const []})

Properties

columns ↔ List<FitGridColumn<T>>
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
visible → List<FitGridColumn<T>>
Visible columns in display order — what the sizer and renderer see.
no setter
widthOverrides → Map<String, double>
Widths the user has dragged columns to, keyed by column id.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
applyLayout({List<String> order = const <String>[], Set<String>? hidden, Map<String, FitGridFreeze> freezes = const <String, FitGridFreeze>{}, Map<String, double>? widths}) → void
Applies a saved layout in one step — one rebuild, one re-measure — rather than a notification per column.
autoSize(String id) → void
Returns a column to its declared width policy — what a double-click on the resize handle does, re-fitting an auto column to its content.
autoSizeAll() → void
Hands every column back to its width policy. What the user gets from double-clicking each divider in turn.
byId(String id) → FitGridColumn<T>?
clearAllWidths() → void
clearWidth(String id) → void
Drops a column's user-applied width. See autoSize, which is the same operation named for what people use it for.
dispose() → void
Discards any resources used by the object.
inherited
isResized(String id) → bool
Whether a column is currently pinned to a user-applied width rather than following its policy.
move(int from, int to) → void
Moves a column within the display order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setFreeze(String id, FitGridFreeze freeze) → void
Pins a column to an edge, or unpins it with FitGridFreeze.none.
setVisible(String id, bool visible) → void
setWidth(String id, double width) → void
Pins a column to an explicit width, as a resize drag does.
showAll() → void
Makes every column visible again.
toString() → String
A string representation of this object.
inherited

Operators

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