|
|
|
@ -19,6 +19,7 @@ class Attribute<T> { |
|
|
|
|
static final Map<String, Attribute> _registry = LinkedHashMap.of({ |
|
|
|
|
Attribute.bold.key: Attribute.bold, |
|
|
|
|
Attribute.italic.key: Attribute.italic, |
|
|
|
|
Attribute.small.key: Attribute.small, |
|
|
|
|
Attribute.underline.key: Attribute.underline, |
|
|
|
|
Attribute.strikeThrough.key: Attribute.strikeThrough, |
|
|
|
|
Attribute.font.key: Attribute.font, |
|
|
|
@ -43,6 +44,8 @@ class Attribute<T> { |
|
|
|
|
|
|
|
|
|
static final ItalicAttribute italic = ItalicAttribute(); |
|
|
|
|
|
|
|
|
|
static final SmallAttribute small = SmallAttribute(); |
|
|
|
|
|
|
|
|
|
static final UnderlineAttribute underline = UnderlineAttribute(); |
|
|
|
|
|
|
|
|
|
static final StrikeThroughAttribute strikeThrough = StrikeThroughAttribute(); |
|
|
|
@ -82,6 +85,7 @@ class Attribute<T> { |
|
|
|
|
static final Set<String> inlineKeys = { |
|
|
|
|
Attribute.bold.key, |
|
|
|
|
Attribute.italic.key, |
|
|
|
|
Attribute.small.key, |
|
|
|
|
Attribute.underline.key, |
|
|
|
|
Attribute.strikeThrough.key, |
|
|
|
|
Attribute.link.key, |
|
|
|
@ -217,6 +221,10 @@ class ItalicAttribute extends Attribute<bool> { |
|
|
|
|
ItalicAttribute() : super('italic', AttributeScope.INLINE, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class SmallAttribute extends Attribute<bool> { |
|
|
|
|
SmallAttribute() : super('small', AttributeScope.INLINE, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class UnderlineAttribute extends Attribute<bool> { |
|
|
|
|
UnderlineAttribute() : super('underline', AttributeScope.INLINE, true); |
|
|
|
|
} |
|
|
|
|