TextComponentViewModel mixin

Mixin for all SingleColumnLayoutComponentViewModels that represent a text-based block, e.g., paragraph, blockquote, list item.

This mixin enforces a consistent contract for all such view models. Each view model can add more properties, but they must at least support the properties in this mixin. Additionally, applyStyles provides consistent application of text-based styling for all view models that add this mixin.

Superclass constraints
Mixin applications

Properties

composingRegion TextRange?
The span of text that's currently sitting in the IME's composing region, which is underlined by this component.
getter/setter pair
composingRegionUnderlineStyle UnderlineStyle
getter/setter pair
createdAt DateTime?
When view model's corresponding node was created, which can be used for making decisions about animated invalidations.
getter/setter pairinherited
customUnderlines Set<CustomUnderline>
getter/setter pair
customUnderlineStyles CustomUnderlineStyles?
getter/setter pair
grammarErrors List<TextRange>
getter/setter pair
grammarErrorUnderlineStyle UnderlineStyle
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
highlightWhenEmpty bool
getter/setter pair
inlineWidgetBuilders InlineWidgetBuilderChain
getter/setter pair
maxLines int?
getter/setter pair
maxWidth double?
The maximum width of this component in the layout, or null to defer to the layout's preference.
getter/setter pairinherited
nodeId String
finalinherited
opacity double
The opacity of this whole node.
getter/setter pairinherited
overflow TextOverflow
getter/setter pair
padding EdgeInsetsGeometry
The padding applied around this component.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection TextSelection?
getter/setter pair
selectionColor Color
getter/setter pair
showComposingRegionUnderline bool
Whether to underline the composingRegion.
getter/setter pair
spellingErrors List<TextRange>
getter/setter pair
spellingErrorUnderlineStyle UnderlineStyle
getter/setter pair
text AttributedText
getter/setter pair
textAlignment TextAlign
getter/setter pair
textDirection TextDirection
getter/setter pair
textStyleBuilder AttributionStyleBuilder
getter/setter pair
textViewModelHashCode int
no setter

Methods

applyStyles(Map<String, dynamic> styles) → void
override
copy() SingleColumnLayoutComponentViewModel
inherited
createUnderlines() List<Underlines>
internalCopy(covariant TextComponentViewModel subclassInstance) TextComponentViewModel
Given a subclassInstance of TextComponentViewModel, copies all base-level text properties from this TextComponentViewModel into the given subclassInstance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
textViewModelEquals(Object other) bool
toString() String
A string representation of this object.
inherited

Operators

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