UnifiedDiffHeader class abstract final

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 and targetLineContent, and optionally a custom sourceLineStart and targetLineStart.
const
factory
UnifiedDiffHeader.none()
Create an empty UnifiedDiffHeader that doesn't add to the diff output.
const
factory
UnifiedDiffHeader.simple()
Create a simple UnifiedDiffHeader with no extra information in the header besides 'source' and 'target'.
const
factory
UnifiedDiffHeader.traditional({required String sourcePath, required DateTime sourceModificationTime, required String targetPath, required DateTime targetModificationTime})
Create a traditional UnifiedDiffHeader including the sourcePath and sourceModificationTime of the source file, and the targetPath and targetModificationTime of the target file.
const
factory

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