MockEntitlementService class
Configurable EntitlementService for gating and paywall tests.
- Implemented types
Constructors
Properties
-
changes
→ Stream<
Set< String> > -
Active entitlement identifiers, emitting on every change.
no setteroverride
-
current
→ Set<
String> -
Entitlements active right now, for synchronous gating in a build method.
no setteroverride
-
entitlements
↔ Set<
String> -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifiedUserId ↔ String?
-
getter/setter pair
- purchaseCount ↔ int
-
getter/setter pair
- purchaseResult ↔ EntitlementResult
-
getter/setter pair
- restoreCount ↔ int
-
getter/setter pair
- restoreResult ↔ EntitlementResult
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
emit(
Set< String> next) → void -
Emits
nexton changes as a purchase or expiry would. -
has(
String entitlement) → bool -
Whether
entitlementis currently active.override -
identify(
String userId) → Future< void> -
Associates purchases with your own user id, so entitlements follow the
account rather than the device.
override
-
logOut(
) → Future< void> -
Detaches the current user on sign-out.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
purchase(
String productId) → Future< EntitlementResult> -
Starts a purchase flow for
productId.override -
restore(
) → Future< EntitlementResult> -
Restores prior purchases for the current store account.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited