DebugConsole class
Debug Console
A console for debugging Flutter apps, and displaying console messages on the widget.
Check the console for prints and errors, while you're testing it, all within your app. Make your own logging or watch for console prints.
Features
- Log your messages
- Display console messages and errors
- Use different levels for better emphasis
- Filter the logs
- Add extra actions to execute from the Debug Console menu
- Check StackTrace of errors
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DebugConsole
Constructors
-
DebugConsole({Key? key, DebugConsoleController? controller, List<
PopupMenuItem< actions = const [], bool expandStackTrace = false, String? savePath})void> > - Debug Console
Properties
-
actions
→ List<
PopupMenuItem< void> > -
final
- controller → DebugConsoleController
-
final
- expandStackTrace → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- savePath → String?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DebugConsole> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DebugConsoleController
-
no setter
- loadPath ↔ String
-
getter/setter pair
Static Methods
-
clear(
) → void - Clears the logs of the root controller.
-
debug(
Object? message, {DateTime? timestamp, StackTrace? stackTrace}) → void -
Adds a log to the root controller, with the level
DebugConsoleLevel.debug
. -
error(
Object? message, {DateTime? timestamp, StackTrace? stackTrace}) → void -
Adds a log to the root controller, with the level
DebugConsoleLevel.error
. -
fatal(
Object? message, {DateTime? timestamp, StackTrace? stackTrace}) → void -
Adds a log to the root controller, with the level
DebugConsoleLevel.fatal
. -
info(
Object? message, {DateTime? timestamp, StackTrace? stackTrace}) → void -
Adds a log to the root controller, with the level
DebugConsoleLevel.info
. -
listen(
void body(), {DebugConsoleController? controller}) → void - Listen for prints and errors, to catch all messages in your app.
-
log(
Object? message, {DebugConsoleLevel level = DebugConsoleLevel.normal, DateTime? timestamp, StackTrace? stackTrace}) → void - Adds a log to the root controller, attached with a message, level, timestamp and stack trace.
-
warning(
Object? message, {DateTime? timestamp, StackTrace? stackTrace}) → void -
Adds a log to the root controller, with the level
DebugConsoleLevel.warning
.