dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
500 B
20 lines
500 B
4 years ago
|
class Embeddable {
|
||
|
static const TYPE_KEY = '_type';
|
||
|
static const INLINE_KEY = '_inline';
|
||
|
final String type;
|
||
|
final bool inline;
|
||
|
final Map<String, dynamic> _data;
|
||
|
|
||
|
Embeddable(this.type, this.inline, Map<String, dynamic> data)
|
||
|
: assert(type != null),
|
||
|
assert(inline != null),
|
||
|
_data = Map.from(data);
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
Map<String, dynamic> m = Map<String, dynamic>.from(_data);
|
||
|
m[TYPE_KEY] = type;
|
||
|
m[INLINE_KEY] = inline;
|
||
|
return m;
|
||
|
}
|
||
|
}
|