CommandHelper class
Handles styled console output (errors, success, warnings) and CLI help/version.
This class centralizes formatting and exit behavior so the CLI stays consistent and easy to maintain.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
error(
String message) → void -
Prints a red error
messageand exits with code 1. -
help(
) → void - Prints CLI usage information and exits.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
success(
String message, {bool shouldExit = true}) → void -
Prints a green success
message. -
toString(
) → String -
A string representation of this object.
inherited
-
version(
) → Future< void> - Prints the package version from pubspec.yaml and exits.
-
warning(
String message) → void -
Prints a yellow warning
messagewithout exiting.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited