ConsoleReporter class

A development reporter that logs the fields retained by ReportEvent.toMap.

Designed for non-production environments. Returns true on send for easy pipelines.

Inheritance

Constructors

ConsoleReporter({bool enabled = true, bool prettyJson = false, int maxContextKeysPreview = 12, int maxMessageLength = 240})
Creates a console reporter with optional formatting and verbosity controls.
const

Properties

enabled → bool
If false, send() is a no-op that returns false.
final
hashCode → int
The hash code for this object.
no setterinherited
maxContextKeysPreview → int
Maximum number of top-level context keys to preview inline.
final
maxMessageLength → int
Truncate long messages for readability.
final
prettyJson → bool
Whether to print the entire JSON payload (can be verbose).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

defaultFileName(ReportEvent event) → String
A JSON file name derived from the ID and timestamp retained in the payload.
inherited
generateFile(ReportEvent event, {String? fileName, Directory? directory}) → Future<File>
Writes the retained JSON to directory or the app's temporary directory.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(ReportEvent event) → Future<bool>
Sends a ReportEvent to the remote/system of choice.
override
share(ReportEvent event) → Future<bool>
User-initiated sharing of a ReportEvent (e.g., via share sheet).
inherited
toString() → String
A string representation of this object.
inherited

Operators

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