billdog_flutter library

BillDog Flutter SDK

Monetization, paywalls, and subscription management for Flutter apps. Uses WebView-based rendering for 100% visual parity with iOS and Android native SDKs.

Quick Start

import 'package:billdog_flutter/billdog_flutter.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await BillDog.configure('your-api-key');
  runApp(MyApp());
}

Presenting a Paywall

BillDog.shared.registerPlacement('onboarding_end');

Custom Purchase Handling

BillDog.configure(
  'your-api-key',
  purchaseController: MyPurchaseController(),
);

Classes

BillDog
BillDog SDK singleton entry point.
BillDogAnalytics
BillDogDelegate
BillDogDelegate — typed lifecycle callbacks (Android parity: BillDog.delegate at BillDog.kt:71, BillDogDelegate interface).
BillDogOptions
Configuration options for BillDog.configure.
Cancelled
CustomerInfo
Information about the current customer.
Entitlement
An entitlement granted to a customer.
Failed
FreeTrial
Free trial offer from the store.
IdentityOptions
Options for BillDog.identify.
IntroductoryOffer
Introductory pricing offer from the store.
Offering
A group of packages presented together.
Package
A Package represents a single purchasable option within an Offering. It combines backend configuration with product data.
PaywallInfo
Information about a paywall configuration.
PaywallPresentationHandler
Handler for paywall presentation events.
PaywallPresentationInfo
Information about a presented paywall.
PaywallView
A widget that renders a BillDog paywall inline by embedding the native paywall view (SwiftUI/UIKit on iOS, Jetpack Compose on Android) via a PlatformView. This is the embedded display path — full-screen / overlay / side-drawer styles are presented natively through BillDog.register(...) instead, not through this widget.
Pending
PlacementDismissed
PlacementEntitled
PlacementError
PlacementPurchased
PlacementRestored
PlacementResult
Placement-registration types — Android parity contract.
PresentationResult
Synchronous answer to "what would happen if I registered this placement?"
PresentError
PresentHoldout
PresentNoPaywall
PresentPaywall
PresentUserSubscribed
Product
A purchasable product from App Store or Google Play.
PurchaseController
Abstract purchase controller for custom purchase handling.
Purchased
PurchaseResult
PurchaseResult — canonical 5-case result for any purchase operation.
Restored
RestoredItem
RestoredItem — canonical per-transaction restore record.
RestoredItems
RestoredPurchase
RestoredPurchase — single restored transaction record.
RestoreFailed
RestoreItemExpired
RestoreItemFailed
RestoreItemRestored
RestoreItemStatus
RestoreItemStatus — per-item disposition of a restored transaction.
RestoreResult
Canonical RestoreResult — 2-case sealed for restore operations.
ReviewTimingConfig
ReviewTimingManager
ReviewTimingResult
Subscription
An active subscription.
SubscriptionStatus
The user's current subscription status.
WebCheckoutResult
Result of an App2Web checkout flow.

Enums

BillDogLogLevel
PUR-262: SDK-wide log level. Canonical 5-level set, parity with iOS/Android/RN.
CacheFetchPolicy
Fetch policy for CustomerInfo — canonical 4 cases (PUR-140).
EntitlementState
Entitlement lifecycle state — 6 canonical cases (PUR-122).
NetworkEnvironment
Network environment for BillDog API calls.
PackageType
Package types corresponding to common subscription periods.
PaywallLoadingState
PaywallPresentationStyle
Paywall presentation style on mobile.
PostPurchaseBehavior
SkipReason
SubscriptionStatusType
Underlying status type enum.
WebCheckoutStatus
Status of a web checkout attempt.

Typedefs

RestorationResult = RestoreResult
Backwards-compatible alias (DEPRECATED — will be removed in next major). New code MUST depend on RestoreResult directly.

Exceptions / Errors

BillDogError
BillDogError — canonical typed error model for the BillDog Flutter SDK.
ConfigurationError
NetworkError
ProductNotFoundError
ReceiptValidationError
StoreError
StoreUnavailableError
PUR-038: store cannot service the request right now (transient).
UnknownError
UserCancelledError