Message class

Represents a message received from the WebView, parsed into structured data. Contains the command, the event, any associated contexts, and optional tracker namespaces.

Constructors

Message.new({required String command, required MessageEvent event, List<SelfDescribing>? contexts, List<String>? trackers})
Message.fromJson(String json)
Message.fromMap(Map<String, dynamic> data)

Properties

command String
final
contexts List<SelfDescribing>?
final
event MessageEvent
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trackers List<String>?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
trackEvent(SnowplowTracker tracker, bool ignoreTrackerNamespace) → void
Tracks the event using the provided tracker. Respects the ignoreTrackerNamespace flag or matches against provided namespaces.

Operators

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