DiscoveryContext class

Context passed to a tip's eligibility check and its presentation.

Carries the generic runtime state a tip might need to decide whether to fire — the current app-launch count, plus an arbitrary data map for consumer-defined extras (e.g. a view counter, a feature flag).

Constructors

DiscoveryContext({int appLaunches = 0, Map<String, dynamic>? data})
const

Properties

appLaunches int
Total app launches since install, incremented by the consumer app. Useful for "show on the 3rd launch" style rules.
final
data Map<String, dynamic>?
Arbitrary consumer-supplied extras. Prefer read for typed access.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T>(String key) → T?
Typed accessor for a value in data. Returns null if missing or if the stored value is not a T.
toString() String
A string representation of this object.
inherited

Operators

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