The header of a UnifiedDiff, generally with two lines, one sourceLine representing the source file, and one targetLine representing the target file.
- Annotations
-
- @immutable
Constructors
- UnifiedDiffHeader.custom({String? sourceLineStart, String? targetLineStart, required String sourceLineContent, required String targetLineContent})
-
Create a custom UnifiedDiffHeader with
sourceLineContent
andtargetLineContent
, and optionally a customsourceLineStart
andtargetLineStart
.constfactory - UnifiedDiffHeader.none()
-
Create an empty UnifiedDiffHeader that doesn't add to the diff output.
constfactory
- UnifiedDiffHeader.simple()
-
Create a simple UnifiedDiffHeader with no extra information
in the header besides 'source' and 'target'.
constfactory
- UnifiedDiffHeader.traditional({required String sourcePath, required DateTime sourceModificationTime, required String targetPath, required DateTime targetModificationTime})
-
Create a traditional UnifiedDiffHeader including the
sourcePath
andsourceModificationTime
of the source file, and thetargetPath
andtargetModificationTime
of the target file.constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceLine → String
-
The line that represents the source file in a unified diff header.
no setter
- targetLine → String
-
The line that represents the target file in a unified diff header.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited