NatrixBoolFlag class final
Flag for Boolean values (bool).
Use NatrixBoolFlag for simple toggles that can be enabled or disabled.
- Inheritance
-
- Object
- NatrixFlag<
bool> - NatrixBoolFlag
Constructors
- NatrixBoolFlag({NatrixChar? acronym, required String id, bool value = false, String tooltip = ""})
-
const
Properties
- acronym → NatrixChar?
-
Optional single-character shorthand for the flag, used as short-form
syntax in command-line arguments (
-awhereais the acronym character). Must be unique within a command's flag set.finalinherited -
examples
→ List<
bool> -
Optional list of example values for help output generation.
finalinherited
- hasAcronym → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the flag, used as long-form syntax in command-line
arguments (
--id).finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tooltip → String
-
Brief description displayed in help output.
finalinherited
- value → bool
-
Current and/or initial value of the flag.
finalinherited
Methods
-
format(
bool value) → String -
Formats a value of type
Tas a string for output or serialization.override -
getExamplesFormatted(
) → List< String> -
Returns formatted string representations of all examples.
inherited
-
getFormatted(
) → String -
Returns the formatted string representation of the current value.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String raw) → bool -
Parses a raw string from command-line arguments into type
T.override -
set(
bool value) → NatrixFlag< bool> -
Returns a new instance of this flag with the specified
value.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited