toPatch method

  1. @useResult
Patch<String> toPatch()

Convert a UnifiedDiff back to a Patch between the source and target files.

Implementation

@useResult
Patch<String> toPatch() => Patch([
      for (final hunk in hunks) ...hunk.updates,
    ]);