setgreet library
Classes
- ActionTriggeredEvent
- Emitted when a button action is triggered by the user.
- FlowCompletedEvent
- Emitted when a flow is completed (user reached the last screen and closed).
- FlowDismissedEvent
- Emitted when a flow is dismissed before completion.
- FlowErrorEvent
- Emitted when an error occurs during flow operations.
- FlowStartedEvent
- Emitted when a flow starts presenting to the user.
- PermissionRequestedEvent
- Emitted when a permission request completes within a flow.
- PurchaseCancelledEvent
- Emitted when the user cancelled a purchase.
- PurchaseCompletedEvent
- Emitted when a purchase through the registered purchase provider succeeded.
- PurchaseFailedEvent
- Emitted when a purchase failed.
- PurchasePendingEvent
- Emitted when a purchase is pending approval (Ask to Buy, a deferred payment).
- RestoreCompletedEvent
- Emitted when a restore finished, with or without something to restore.
- RestoreFailedEvent
- Emitted when a restore failed.
- ScreenChangedEvent
- Emitted when user navigates between screens within a flow.
- Setgreet
- Main Setgreet SDK class
- SetgreetConfig
- Configuration class for Setgreet SDK initialization
- SetgreetFlowCallbacks
- Container for flow event callbacks using builder pattern.
- SetgreetFlowEvent
- Sealed class hierarchy representing all flow lifecycle events.
- SetgreetPaywallImpressionContext
- What the SDK reports when a paywall screen has rendered its catalog.
- SetgreetPurchaseAccessState
- What the user currently has access to, as the provider reports it.
- SetgreetPurchaseIntroOffer
- An introductory offer attached to a product.
- SetgreetPurchasePeriod
- How often a subscription renews. A product without a period is a one-time (lifetime) purchase.
- SetgreetPurchaseProduct
- One purchasable product, normalized from the provider's own model.
- SetgreetPurchaseProvider
-
Implemented by the host app on top of its own purchase tool and
registered with
Setgreet.setPurchaseProvider. Extend this class: the optional methods then keep their default no-op bodies. - SetgreetPurchaseResult
- SetgreetPurchaseSource
- Where a paywall's products come from, in the provider's own vocabulary.
- SetgreetRestoreResult
- ThemeExtractor
- Extracts Material 3 theme data from a BuildContext and converts it to a serializable map suitable for the Setgreet sync-theme API.
- ThemeSyncApi
- Posts an extracted Flutter theme to the Setgreet backend.
Enums
- DismissReason
- Reasons why a flow may be dismissed before completion.
- FlowErrorType
- Categories of errors that may occur during flow operations.
- PermissionResult
- Results of a permission request.
- PermissionType
- Types of permissions that can be requested within a flow.
- SetgreetPurchaseErrorCode
-
Normalized error codes. rawValue is what analytics carry as
errorCode. - SetgreetPurchasePeriodUnit
- Units a subscription period is expressed in. rawValue is the wire value.
- SetgreetPurchaseStatus
- The outcome of SetgreetPurchaseProvider.purchase. rawValue is the Response Split value the SDK sets on the button.
- SetgreetRestoreStatus
- The outcome of SetgreetPurchaseProvider.restorePurchases. rawValue is the Response Split value the SDK sets on the button.
Typedefs
- ActionTriggeredCallback = void Function(ActionTriggeredEvent event)
- FlowCompletedCallback = void Function(FlowCompletedEvent event)
- FlowDismissedCallback = void Function(FlowDismissedEvent event)
- FlowErrorCallback = void Function(FlowErrorEvent event)
- FlowStartedCallback = void Function(FlowStartedEvent event)
- Callback type definitions for flow events
- PermissionRequestedCallback = void Function(PermissionRequestedEvent event)
- PurchaseCancelledCallback = void Function(PurchaseCancelledEvent event)
- PurchaseCompletedCallback = void Function(PurchaseCompletedEvent event)
- PurchaseFailedCallback = void Function(PurchaseFailedEvent event)
- PurchasePendingCallback = void Function(PurchasePendingEvent event)
- RestoreCompletedCallback = void Function(RestoreCompletedEvent event)
- RestoreFailedCallback = void Function(RestoreFailedEvent event)
- ScreenChangedCallback = void Function(ScreenChangedEvent event)
Exceptions / Errors
- SetgreetException
- Base exception class for Setgreet SDK errors
- SetgreetFlowException
- Exception thrown when flow operations fail
- SetgreetInitializationException
- Exception thrown when SDK initialization fails
- SetgreetPurchaseError
- A normalized purchase error. Throw it from SetgreetPurchaseProvider.loadProducts; return it in a result everywhere else.
- SetgreetThemeException
- Exception thrown when theme sync fails
- SetgreetTrackingException
- Exception thrown when event tracking fails
- SetgreetUserException
- Exception thrown when user identification fails