fullDenormalizer method

Delta fullDenormalizer()

Fully 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 fullDenormalizer() {
  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());
}