InsertOpDenormalizer class

Denormalization is splitting a text insert operation that has new lines into multiple ops where each op is either a new line or a text containing no new lines.

Why? It makes things easier when picking op that needs to be inside a block when rendering to html.

Example:

 {insert: 'hello\n\nhow are you?\n', attributes: {bold: true}}

Denormalized:

 [
     {insert: 'hello', attributes: {bold: true}},
     {insert: '\n', attributes: {bold: true}},
     {insert: '\n', attributes: {bold: true}},
     {insert: 'how are you?', attributes: {bold: true}},
     {insert: '\n', attributes: {bold: true}}
 ]

This is designed to work on a raw map from decoded delta JSON.

Constructors

InsertOpDenormalizer()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

denormalize(Map<String, dynamic> op) List<Map<String, dynamic>>