LoggerService class abstract

Abstract service for user messaging, logging, and interactive prompts.

Implementers

Constructors

LoggerService()

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

chooseAny<T>(String message, {required List<T> choices, List<T>? defaultValues, String display(T)?}) List<T>
Prompts user to select multiple choices from choices.
chooseOne<T>(String message, {required List<T> choices, T? defaultValue, String display(T)?}) → T
Prompts user to select one choice from choices.
confirm(String message, {bool defaultValue = false}) bool
Prompts user for yes/no confirmation with message.
enableJsonOutput() → void
Enables JSON formatted logging output.
error(String message, [dynamic error, StackTrace? stackTrace]) → void
Logs an error message with optional error object and stackTrace.
info(String message) → void
Logs an informational message.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
progress(String message) → Progress
Starts a progress spinner display with message.
prompt(String message, {dynamic defaultValue, bool hidden = false}) String
Prompts user for a text input with message and optional defaultValue.
setLogLevel(Level level) → void
Sets the logging level threshold.
success(String message) → void
Logs a success message.
toString() String
A string representation of this object.
inherited
verbose(String message) → void
Logs a verbose debugging message.
warning(String message) → void
Logs a warning message.

Operators

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