ConsoleReporter class
A development reporter that logs event details to the console/debug output.
Designed for non-production environments. Returns true on send for easy pipelines.
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 -
Builds a stable, human-readable file name for a report event.
inherited
-
generateFile(
ReportEvent event, {String? fileName, Directory? directory}) → Future< File> -
Generates a JSON file representation of the
eventfor sharing or local persistence.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
-
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