MetricPayload class

An event that is tracked by AppFit.

Constructors

MetricPayload({required String sourceEventId, required String eventName, String? userId, String? anonymousId, Map<String, dynamic>? properties, EventSystemProperties? systemProperties})
Creates a new instance of MetricPayload.
const
MetricPayload.fromJson(Map<String, dynamic> json)
Creates a new instance of MetricPayload from a JSON object.
factory

Properties

anonymousId String?
The anonymous identifier for the event. Note: Either userId or anonymousId must be provided.
final
eventName String
The name of the event.
final
hashCode int
The hash code for this object.
no setterinherited
properties Map<String, dynamic>?
The properties of the event.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceEventId String
The unique identifier for the event.
final
systemProperties EventSystemProperties?
The system properties of the event. Note: These are automatically added by the SDK and should not be modified.
final
userId String?
The user identifier for the event. Note: Either userId or anonymousId must be provided.
final

Methods

copyWith({String? sourceEventId, String? eventName, DateTime? occurredAt, String? userId, String? anonymousId, Map<String, String>? properties}) MetricPayload
Allows you to create a new instance of the MetricPayload with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the MetricPayload to a JSON object.
toString() String
A string representation of this object.
inherited

Operators

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