SuccessResult class

Successful command execution.

Inheritance
Annotations

Constructors

SuccessResult({Map<String, Object?> data = const {}, int? exitCode})
const

Properties

data → Map<String, Object?>
Arbitrary JSON-serializable data emitted on stdout. When --output=json, this object is emitted verbatim under the data key. When --output=text, CliApp calls text to render it.
final
exitCode → int
The contract exit code this result maps to.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
outcome → String
One of 'success', 'error', 'warning' — drives the JSON $outcome field.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
Default text rendering: each key-value pair on its own line, indented two spaces. Apps may override by extending SuccessResult and providing a custom text implementation.
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.
inherited

Operators

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