https://github.com/rikulo/diff-match-patch
A port of Google Diff Match and Patch library to Dart
https://github.com/rikulo/diff-match-patch
Last synced: about 1 year ago
JSON representation
A port of Google Diff Match and Patch library to Dart
- Host: GitHub
- URL: https://github.com/rikulo/diff-match-patch
- Owner: rikulo
- License: apache-2.0
- Created: 2022-07-18T06:55:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-28T11:24:26.000Z (almost 3 years ago)
- Last Synced: 2025-05-09T00:43:07.946Z (about 1 year ago)
- Language: Dart
- Homepage: https://quire.io
- Size: 31.3 KB
- Stars: 6
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# Diff, Match and Patch
A port of [Google Diff Match and Patch library](https://github.com/google/diff-match-patch) to Dart
* [Repository](https://github.com/rikulo/diff-match-patch)
* [API Reference](https://pub.dev/documentation/diff_match_patch2/latest/)
## Usage
```
import "package:diff_match_patch2/diff_match_patch.dart";
...
final dmp = DiffMatchPatch();
dmp.patch_main(oldText, newText);
```
* `Patch` and `Diff` can be jsonized. To decode, use `Patch.fromJson` and `Diff.fromJson`.
* [Example](https://github.com/rikulo/diff-match-patch/blob/main/test/diff_test.dart)
* `patch_main` in [Google Diff Match and Patch library](https://github.com/google/diff-match-patch) are split into `patch_main`, `patch_diffs` and `patch_make` for strong types.
## Who Uses
* [Quire](https://quire.io) - a simple, collaborative, multi-level task management tool.
* [Keikai](https://keikai.io) - a sophisticated spreadsheet for big data