enum AttributeScope { INLINE, // refer to https://quilljs.com/docs/formats/#inline BLOCK, // refer to https://quilljs.com/docs/formats/#block EMBEDS, // refer to https://quilljs.com/docs/formats/#embeds } class Attribute { final String key; final AttributeScope scope; Attribute(this.key, this.scope); } class BoldAttribute extends Attribute { BoldAttribute() : super('bold', AttributeScope.INLINE); } class ItalicAttribute extends Attribute { ItalicAttribute() : super('italic', AttributeScope.INLINE); } class UnderlineAttribute extends Attribute { UnderlineAttribute() : super('underline', AttributeScope.INLINE); } class StrikeThroughAttribute extends Attribute { StrikeThroughAttribute() : super('strike', AttributeScope.INLINE); }