AppEvent class

One thing that happened on the way from one step to the next.

Constructors

AppEvent.analytics(String name, {Map<String, Object?> params = const {}})
A product analytics event and its parameters.
AppEvent.custom({required String channel, required String title, String? detail, Map<String, Object?> data = const {}, String? body, bool error = false, String? level, String? origin})
const
AppEvent.fromJson(Map<String, Object?> json)
Decodes what toJson wrote — an entry of a step's .events.json.
factory
AppEvent.log(String message, {String? level, String? logger})
A log line.
AppEvent.query({required String sql, List<Object?> args = const [], int? rows})
A database statement, with the SQL as the body so it can be read whole.
AppEvent.request({required String method, required String url, int? status, Map<String, Object?> data = const {}, String? body})
An HTTP request: POST /login → 401.

Properties

body → String?
Long text — a SQL statement, a JSON body, a stack. Kept apart from data because it is rendered as text rather than as fields.
final
channel → String
One of AppChannel's constants, or a name of the reporter's own.
final
data → Map<String, Object?>
The structured payload, shown when a row is expanded.
final
detail → String?
Trailing detail beside the title: a status code, a row count, a logger name. Null where the title says everything.
final
error → bool
Whether this event is itself a problem: a 4xx/5xx, a severe log, a channel call that came back an error. Tints the row; never fails a step.
final
hashCode → int
The hash code for this object.
no setterinherited
level → String?
The log level, for AppChannel.log events.
final
origin → String?
Where the app made this event — package:app/src/cart.dart Cart.checkout.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String
The one-line summary — what the list shows, and what an agent reads.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

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