onramper_flutter library
Public Dart API for the OnramperSDK Flutter plugin.
Exports the idiomatic Dart wrappers around the Pigeon-generated DTOs
(lib/src/platform/pigeon.g.dart) plus the top-level OnramperClient
facade and the checkout button widget.
Classes
- AmountLimitRequirement
- Amount-bounds requirement for a specific provider.
- CheckoutButtonStyle
- Visual customization for OnramperCheckoutButton plus the ToS lines rendered above it.
- CheckoutEvent
- Domain event observed from the native SDK.
- CheckoutFinalizeResponse
-
Full finalize response emitted with a CheckoutEventKind.checkoutFinalized
event. Consumers usually only need
renderContexton the same event — this carries the full payload for cases where partner-side metadata matters. - CheckoutIntentRequest
- Top-level request passed to OnramperClient.getCheckoutRequirements.
- CheckoutRequirement
- Tagged union of the four requirement variants the BFF can return.
- CheckoutRequirementsResult
- Aggregated response: a checkout id, requirements, quote, and the native button.
- HeadlessCheckoutData
- Payment-render information carried inside CheckoutFinalizeResponse.
- OnramperCheckoutButton
- Consumer-facing wrapper that renders any unsatisfied ToS items above the native OnramperNativeCheckoutButton.
- OnramperClient
- Primary, consumer-facing entry point to the Onramper Flutter plugin.
- OnramperConfiguration
-
Configuration passed to
OnramperClient.configure. - OnramperNativeCheckoutButton
-
Embeds the native iOS
OnramperCheckoutButton(SwiftUI) directly in the Flutter widget tree via a platform view. - OnramperState
- Snapshot of the SDK state with whatever payload that state carries.
- OnramperTransactionData
- Transaction parameters for a single checkout intent.
- QuoteResponse
- Quote returned by the BFF for a given checkout intent.
- RenderContext
-
Render payload attached to OnramperStateKind.rendering and the
renderingStarted/checkoutFinalizedevents. - ReverificationRequirement
- Re-verification requirement: the SDK asks the user to re-confirm a previously-collected identity field (usually a phone number) because enough time has elapsed relative to the provider's recency policy.
- SessionCredentials
- Session credentials returned by the partner backend, used to bootstrap and later refresh an SDK session.
- TosItem
- Single document inside a TosRequirement.
- TosRequirement
- Terms of Service requirement: provider + list of documents.
- UserInfoField
- One identity field needed by KYC.
- UserInfoRequirement
- KYC requirement: provider + list of identity fields.
- WalletInfo
- Wallet payload submitted with a checkout intent.
Enums
- CheckoutEventKind
- Discriminator for events streamed to consumers of OnramperClient.events.
- CheckoutPaymentType
- Specific payment surface used inside the checkout view.
- CheckoutRequirementKind
- Discriminator for the four CheckoutRequirement variants.
- OnramperEnvironment
- Runtime environment the SDK targets.
- OnramperErrorKind
- Categorical taxonomy of errors emitted by the native SDK.
- OnramperLogLevel
- Verbosity level for SDK logging.
- OnramperStateKind
- Coarse-grained machine state of an OnramperClient.
- OnramperTheme
- Visual theme applied to native checkout UI.
- RenderType
- Whether the native checkout is rendered in a webview or via a deep link.
- ReverificationField
- Which identity field a ReverificationRequirement applies to.
- TosItemType
- Specific Terms of Service style document the user must accept.
- TransactionType
- Whether the user is buying crypto with fiat or selling crypto for fiat.
- UserInfoFieldType
- Identity / KYC fields that may be required before checkout.
Extensions
- TosItemTypeDisplayName on TosItemType
-
Human-readable label for a TosItemType. Mirrors native
ToSPresentation.displayNamein OnramperSDK so Dart rendering matches the iOS SDK's wording 1:1.
Typedefs
-
SessionExpirationHandler
= Future<
SessionCredentials> Function() - Callback invoked by the SDK when the native session token has expired and a fresh SessionCredentials pair must be fetched from the partner backend.
Exceptions / Errors
- OnramperError
- Public, throwable error type exposed by the SDK.