HighlightStyle class
How highlighted text — <mark> — is drawn.
Every field is optional. An unset field falls back to the theme's
tertiaryContainer and onTertiaryContainer colours, so highlighting
reads well in light and dark themes alike.
- Annotations
Constructors
- HighlightStyle({Color? backgroundColor, Color? color})
-
Creates a HighlightStyle. Null fields defer to the default.
const
Properties
- backgroundColor → Color?
-
The colour behind the text.
final
- color → Color?
-
The text colour. Defaults to the colour that reads on
backgroundColor's default.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{Color? backgroundColor, Color? color}) → HighlightStyle - A copy with the given fields replaced.
-
merge(
HighlightStyle? other) → HighlightStyle -
This style, with any unset field taken from
other, field by field. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
ColorScheme scheme) → HighlightStyle -
This style with every remaining default filled in from
scheme. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
lerp(
HighlightStyle? a, HighlightStyle? b, double t) → HighlightStyle? - Linearly interpolates between two styles.