DebugConsoleController class final
Mutable controller for a debug console pane.
This is intentionally lightweight and framework-local. Apps can hold one controller, append logs from business logic, and let DebugConsole or ArtisanalApp render the current tail.
Constructors
- DebugConsoleController({int maxEntries = 200, bool initiallyVisible = false})
Properties
-
entries
→ List<
DebugConsoleEntry> -
Current immutable log entries.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxEntries → int
-
Maximum number of stored log lines.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
int> -
Stream of controller revisions for runtime-integrated listeners.
no setter
- visible → bool
-
Whether an attached console pane should currently be visible.
no setter
Methods
-
add(
String message, {String level = 'info', DateTime? timestamp}) → void - Appends a log line.
-
addListener(
void listener()) → void - Adds a listener fired whenever entries or visibility change.
-
clear(
) → void - Removes all entries.
-
debug(
String message) → void - Appends a debug line.
-
error(
String message) → void - Appends an error line.
-
exception(
Object error, [StackTrace? stackTrace]) → void - Appends an exception and optional stack trace as an error entry.
-
info(
String message) → void - Appends an informational line.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
void listener()) → void - Removes a previously added listener.
-
runZoned<
T> (FutureOr< T> body(), {bool capturePrint = true, bool captureErrors = true, String printLevel = 'debug'}) → Future<T> -
Runs
bodyin a zone that can forwardprint()and uncaught errors into this console controller. -
setVisible(
bool visible) → void - Sets pane visibility.
-
toggle(
) → void - Toggles pane visibility.
-
toString(
) → String -
A string representation of this object.
inherited
-
warn(
String message) → void - Appends a warning line.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited