denormalize method
Delta
denormalize()
Denormalizes the operations within the Delta.
Converts each operation in the Delta to a fully expanded form, where operations that contain newlines are split into separate operations.
Implementation
Delta denormalize() {
if (isEmpty) return this;
final List<Map<String, dynamic>> denormalizedOps =
map<List<Map<String, dynamic>>>(
(Operation op) => _denormalize(
op.toJson(),
),
).flattened.toList();
return Delta.fromOperations(
denormalizedOps.map<Operation>((e) => Operation.fromJson(e)).toList());
}