ConsoleHelper class

Console helper for consistent output formatting

Constructors

ConsoleHelper()

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

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

Static Properties

terminalWidth int
Get terminal width (fallback to 80 if unable to detect)
no setter

Static Methods

bullet(String text, {String bullet = '•'}) → void
Display a bullet point
checkbox(String text, {bool checked = false}) → void
Display a checkbox item
clearLine() → void
Clear current line
closeSection() → void
Close a sub-header section
confirm(String question, {bool defaultValue = true}) bool
Display a confirmation prompt (Y/n)
dividerWithText(String text) → void
Display a divider with text
error(String message) → void
Display error message
grid(List<String> items) → void
Display a grid of items (auto-fit to terminal width)
Display a formatted header
indent(String text, {int spaces = 2}) → void
Display indented text
info(String message) → void
Display info message
list(List<String> items, {int spaces = 2}) → void
Display a list of items
Display a menu option
multiselect(String question, List<String> options, {List<int> defaultIndices = const []}) List<String>
Display a multi-select prompt
newLine([int count = 1]) → void
New line
outro(String message, {String? link}) → void
Display an outro message
progress(String message, {int current = 0, int total = 100}) → void
Display progress indicator
prompt(String question) String
Display a prompt
rule({String character = '─'}) → void
Display a horizontal rule
select(String question, List<String> options) String
Display a selection prompt
step(int step, int total, String description) → void
Display a step counter
subHeader(String title) → void
Display a sub-header
success(String message) → void
Display success message
table(List<List<String>> rows, {List<int>? columnWidths}) → void
Display a table
warning(String message) → void
Display warning message