GitDiffController class
Controller for GitDiffViewer.
Holds a GitDiffModel and delegates updates to it. Provides methods for setting diff content and configuring the display.
Constructors
- GitDiffController({GitDiffModel? initial})
- Creates a controller with an optional initial model.
Properties
-
files
→ List<
DiffFile> -
The parsed diff files.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- model → GitDiffModel
-
The current diff model state.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollPercent → double
-
Current scroll percentage.
no setter
- totalAdditions → int
-
Total additions across all files.
no setter
- totalDeletions → int
-
Total deletions across all files.
no setter
Methods
-
addListener(
void listener()) → void - Adds a listener for state changes.
-
configure(
{bool? showLineNumbers, bool? wrapLines, bool? zeroPadLineNumbers, DiffViewMode? viewMode, DiffStyles? styles}) → void - Configures display options.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
void listener()) → void - Removes a listener.
-
setDiff(
String rawDiff) → void - Sets the raw unified diff text.
-
setSize(
int width, int height) → void - Updates the viewport size.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Msg msg) → (GitDiffModel, Cmd?) - Forwards a message to the underlying model.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited