A port of Google Diff Match and Patch library to Dart
import "package:diff_match_patch2/diff_match_patch.dart";
...
final dmp = DiffMatchPatch();
dmp.patch_main(oldText, newText);
Patch
andDiff
can be jsonized. To decode, usePatch.fromJson
andDiff.fromJson
.patch_main
in Google Diff Match and Patch library are split intopatch_main
,patch_diffs
andpatch_make
for strong types.