FitGridCellSpec class
Everything the render layer needs to paint one text cell.
Resolved at build time, because painting happens where there is no
BuildContext to look anything up. Cheap value equality matters: it decides
whether a cached TextPainter can be reused or has to be laid out again.
- Annotations
Constructors
-
FitGridCellSpec({required String text, required TextStyle style, required FitGridAlignment alignment, required FitGridOverflow overflow, int? maxLines = 1, IconData? icon, Color? iconColor, double? iconSize, List<
int> highlights = const <int>[], String? semanticLabel, bool placeholder = false, FitGridCellVisualSpec? visual}) -
const
Properties
- alignment → FitGridAlignment
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasHighlights → bool
-
no setter
-
highlights
→ List<
int> -
Ranges of text to paint a highlight behind, as flat
start, endpairs in UTF-16 offsets.final - icon → IconData?
-
A glyph painted before the text, sharing the cell's single painter.
final
- iconColor → Color?
-
final
- iconSize → double?
-
final
- maxLines → int?
-
Line budget for this cell, or null for as many lines as it takes. Part of
the spec rather than the column config because it changes what the cached
painter laid out, and so has to take part in the equality check below.
final
- overflow → FitGridOverflow
-
final
- placeholder → bool
-
Whether this cell paints a skeleton bar instead of text.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
What a screen reader announces for this cell, when that should differ
from the painted text — a raw timestamp painted as "3m ago", say.
final
- style → TextStyle
-
final
- text → String
-
final
- visual → FitGridCellVisualSpec?
-
A chart painted beneath the text, or null.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- empty → const FitGridCellSpec
- A blank cell. Handed out for rows a FitGridDataSource has not delivered yet, where there is nothing to paint but the geometry still has to exist.
- loading → const FitGridCellSpec
- A skeleton bar standing in for content that is on its way — a row a data source is still fetching, or the rows below the end while more load.