Guard class

A plugin's objection to tearing a worktree down, raised before the checklist renders.

Distinct from a teardown step: a step is something you may choose to run, a guard is a reason not to start. Git motivates GuardLevel.block (do not destroy uncommitted work); Claude motivates GuardLevel.warn (it is mid-task, but you may know better).

Constructors

Guard(GuardLevel level, String reason)
const
Guard.block(String reason)
const
Guard.warn(String reason)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
level → GuardLevel
final
reason → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, Object?> json) → Guard