StyleMarkup class

文本样式的聚合标签

有效的标签名称:style 参数:

  • name
  • color
  • background
  • size
  • font-family
  • weight: `100~900`|bold|normal
  • font-style: normal|italic 参考FontStyle
  • decor: none|underline|overline|lineThrough 参考TextDecoration
  • decor-style: double|dashed|dotted|solid|wavy 参考TextDecorationStyle
  • decor-color
  • thickness

示例1:<style color=red background=white size=20 weight=900>hypertext</style> 示例2:<style name=your_style_name>hypertext</style>

Inheritance
Implementers

Constructors

StyleMarkup({String tag = 'style', Set<String>? alias, ColorMapper? colorMapper, StyleMapper? styleMapper, FontWeight? weight, FontStyle? fontStyle, double? height, TextDecoration? decoration, TextDecorationStyle? decorationStyle, Color? decorationColor, double? decorationThickness})
const

Properties

alias Set<String>?
标签别名
finalinherited
colorMapper ColorMapper?
String to Color mapping
final
decoration TextDecoration?
final
decorationColor Color?
final
decorationStyle TextDecorationStyle?
final
decorationThickness double?
final
fontStyle FontStyle?
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
styleMapper StyleMapper?
String to TextStyle mapping
final
tag String
标签名称
finalinherited
tags List<String>
支持的标签集合
no setterinherited
weight FontWeight?
final

Methods

markup(List<HypertextSpan>? children, StartTagToken token, HypertextEventHandler? eventHandler, ColorMapper? colorMapper, StyleMapper? styleMapper) HypertextSpan
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMarkup(List<HypertextSpan>? children, MarkupContext ctx) HypertextSpan
override
optBgColor(MarkupContext context, {bool enableTagAttr = true}) Color?
optColor(MarkupContext context, {bool enableTagAttr = true}) Color?
optFontFamily(MarkupContext context, {bool enableTagAttr = true}) String?
optFontSize(MarkupContext context, {bool enableTagAttr = true}) double?
optFontStyle(MarkupContext ctx, {bool enableTagAttr = true}) FontStyle?
optFontWeight(MarkupContext ctx, {bool enableTagAttr = true}) FontWeight?
optStyle(MarkupContext context, {bool enableTagAttr = true}) TextStyle?
optTextDecoration(MarkupContext ctx, {String attrPrefix = '', bool enableTagAttr = true}) FontTextDecoration?
toString() String
A string representation of this object.
inherited

Operators

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