diff_match_patch
0.4.1, released 5 years ago by an unverified publisher
Dart library implementing diff, match and patch algorithms for plain text.
WASM-ready
What it does
Provides Myer's diff algorithm, a Bitap matching algorithm, and patch utilities to compare and synchronize plain text. It includes pre‑diff speedups and post‑diff cleanups for better performance and output quality.
AI-written summary of version 0.4.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to compute differences between two strings
- You need to generate or apply text patches in a Dart or Flutter app
Skip it when
- You require real‑time collaborative editing with conflict resolution
- You need a full‑featured diff/merge UI component
Strengths
- Robust, well‑tested algorithms
- Null‑safety support
- No external dependencies
Weaknesses
- Only works with plain text, not structured data
- No built‑in UI components for displaying diffs
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Alternatives
Packages that do the same job and could replace diff_match_patch.
- json_patch
Pure Dart utility package for the JSON Patch standard to apply patches and perform diffs.
50Compare
Works with
Packages commonly used together with diff_match_patch: ones it builds on, ones built on it, and its own family.
- bloc_testBuilt on diff_match_patchA testing library that makes it easy to test blocs and cubits.
- dart_quill_deltaBuilt on diff_match_patchDart port of Quill Delta JSON format for rich-text documents
- bloc_presentation_testBuilt on diff_match_patchA testing library for Blocs and Cubits utilizing BlocPresentationMixin.
- pretty_diff_textBuilt on diff_match_patchWidget that displays differences between two texts using RichText
- parchment_deltaBuilt on diff_match_patchDart implementation of Quill Delta format for rich-text editing
- json_diffBuilt on diff_match_patchUtilities for diffing two JSON objects in Dart.
- riverpod_testBuilt on diff_match_patchA testing library for easily testing Riverpod providers.
- state_notifier_testBuilt on diff_match_patchA testing utility library for StateNotifier and Riverpod