ColorMarkup class
文本颜色标记
对文本设置颜色,可通过colorMapper指定一组字符串到Color的映射, 默认映射是kBasicCSSColors
有效的Tag名称:color
参数
- color:
colorName|hexColor
示例:
<color=red>foo</color>
<color color="#FF0000">foo</color>
- Inheritance
-
- Object
- HyperMarkup
- TagMarkup
- StyleMarkup
- ColorMarkup
Constructors
- ColorMarkup.new({String tag = 'color', ColorMapper? colorMapper})
-
const
Properties
-
alias
→ Set<
String> ? -
标签别名
finalinherited
- colorMapper → ColorMapper?
-
字符串到Color的映射
finalinherited
- decoration → TextDecoration?
-
finalinherited
- decorationColor → Color?
-
finalinherited
- decorationStyle → TextDecorationStyle?
-
finalinherited
- decorationThickness → double?
-
finalinherited
- fontStyle → FontStyle?
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag → String
-
标签名称
finalinherited
-
支持的标签集合
no setterinherited
- weight → FontWeight?
-
finalinherited
Methods
-
markup(
List< HypertextSpan> ? children, StartTagToken token, HypertextEventHandler? eventHandler, ColorMapper? colorMapper) → 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? -
inherited
-
optColor(
MarkupContext context, {bool enableTagAttr = true}) → Color? -
inherited
-
optFontFamily(
MarkupContext context, {bool enableTagAttr = true}) → String? -
inherited
-
optFontSize(
MarkupContext context, {bool enableTagAttr = true}) → double? -
inherited
-
optFontStyle(
MarkupContext ctx, {bool enableTagAttr = true}) → FontStyle? -
inherited
-
optFontWeight(
MarkupContext ctx, {bool enableTagAttr = true}) → FontWeight? -
inherited
-
optTextDecoration(
MarkupContext ctx, {String attrPrefix = '', bool enableTagAttr = true}) → FontTextDecoration? -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited