From 36d40a989919848287d9fcc837c45356ace2500e Mon Sep 17 00:00:00 2001 From: singerdmx Date: Fri, 15 Jan 2021 10:45:50 -0800 Subject: [PATCH] Add size and font attributes --- lib/models/documents/attribute.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/models/documents/attribute.dart b/lib/models/documents/attribute.dart index 7ee2e4f0..d7865e7d 100644 --- a/lib/models/documents/attribute.dart +++ b/lib/models/documents/attribute.dart @@ -19,6 +19,8 @@ class Attribute { Attribute.italic.key: Attribute.italic, Attribute.underline.key: Attribute.underline, Attribute.strikeThrough.key: Attribute.strikeThrough, + Attribute.font.key: Attribute.font, + Attribute.size.key: Attribute.size, Attribute.link.key: Attribute.link, Attribute.color.key: Attribute.color, Attribute.background.key: Attribute.background, @@ -41,6 +43,10 @@ class Attribute { static final StrikeThroughAttribute strikeThrough = StrikeThroughAttribute(); + static final FontAttribute font = FontAttribute(null); + + static final SizeAttribute size = SizeAttribute(null); + static final LinkAttribute link = LinkAttribute(null); static final ColorAttribute color = ColorAttribute(null); @@ -195,6 +201,14 @@ class StrikeThroughAttribute extends Attribute { StrikeThroughAttribute() : super('strike', AttributeScope.INLINE, true); } +class FontAttribute extends Attribute { + FontAttribute(String val) : super('font', AttributeScope.INLINE, val); +} + +class SizeAttribute extends Attribute { + SizeAttribute(String val) : super('size', AttributeScope.INLINE, val); +} + class LinkAttribute extends Attribute { LinkAttribute(String val) : super('link', AttributeScope.INLINE, val); }