HtmlStyleContext class

Style context for inline text formatting inheritance.

Tracks accumulated styles as we descend through HTML elements.

Constructors

HtmlStyleContext({String? colorHex, double? fontSize, DocxFontWeight fontWeight = DocxFontWeight.normal, DocxFontStyle fontStyle = DocxFontStyle.normal, List<DocxTextDecoration> decorations = const [], DocxHighlight highlight = DocxHighlight.none, String? shadingFill, String? href, bool isLink = false, bool isSuperscript = false, bool isSubscript = false, bool isAllCaps = false, bool isSmallCaps = false, bool isDoubleStrike = false, bool isOutline = false, bool isShadow = false, bool isEmboss = false, bool isImprint = false, int listLevel = -1})
const

Properties

colorHex String?
final
decorations List<DocxTextDecoration>
final
fontSize double?
final
fontStyle DocxFontStyle
final
fontWeight DocxFontWeight
final
hashCode int
The hash code for this object.
no setterinherited
highlight DocxHighlight
final
href String?
final
isAllCaps bool
final
isDoubleStrike bool
final
isEmboss bool
final
isImprint bool
final
final
isOutline bool
final
isShadow bool
final
isSmallCaps bool
final
isSubscript bool
final
isSuperscript bool
final
listLevel int
Depth of current list nesting.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadingFill String?
final

Methods

copyWith({String? colorHex, double? fontSize, DocxFontWeight? fontWeight, DocxFontStyle? fontStyle, List<DocxTextDecoration>? decorations, DocxHighlight? highlight, String? shadingFill, String? href, bool? isLink, bool? isSuperscript, bool? isSubscript, bool? isAllCaps, bool? isSmallCaps, bool? isDoubleStrike, bool? isOutline, bool? isShadow, bool? isEmboss, bool? isImprint, int? listLevel}) HtmlStyleContext
mergeWith(String? tag, String style, String? colorParser(String)) HtmlStyleContext
Merge style context with tag-based and CSS style updates.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetBackground() HtmlStyleContext
Reset background color (for inheritance boundaries). NOTE: copyWith(shadingFill: null) doesn't work because null means "keep original". We need to explicitly create a new context without the shadingFill.
toString() String
A string representation of this object.
inherited

Operators

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