RealWorldContext class

Represents a full context event in a moment in time. Use RealWorldContext.log to log an event.

Constructors

RealWorldContext(ContextIdHolder _contextId)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appendOutcomeMetadata(Map<String, dynamic> metadata) Future<void>
This method allows you to append custom outcomes to that specific outcome We recommend using this method to provide information like the selected price tier / plan, or other relevant info about the type of product or action the user has selected Using the same ID multiple times will replace the previous entries with that ID.
log(Outcome outcome) Future<void>
Use this method to log an outcome and send the context event to the backend
logIfNotLoggedYet(Outcome outcome) Future<void>
Use this function to log an outcome only if this particular context object hasn't been logged yet
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldUpsell() Future<bool>
Check if you now is a good time to show an upsell prompt. During calibration phase, this will always be true.
toString() String
A string representation of this object.
inherited
validate() Future<String>
Call this method to do a local validation of your ContextSDK setup

Operators

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