UnifiedDiffer class

Generates the unified format of diff -u.

The unified format inherits the technical improvements made by the context format, but produces a smaller diff with old and new text presented immediately adjacent.

Inheritance

Constructors

UnifiedDiffer({int context = 3})

Properties

context int
The number of unchanged lines shown above and blow a change.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareLines(Iterable<String> source, Iterable<String> target, {String? sourceLabel, String? targetLabel}) Iterable<String>
Compares two iterables of lines from source to target.
override
compareStrings(String source, String target, {String? sourceLabel, String? targetLabel}) Iterable<String>
Compares two strings from source to target.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited