import 'billing_models.dart'; /// Clean abstraction over store billing operations. /// All platform-specific types (e.g. in_app_purchase / BillingClient) remain isolated behind this interface. abstract class BillingService { /// Stream emitting real-time purchase updates from the store. Stream> get purchaseStream; /// Initializes the billing service and verifies connection to the store. Future initialize(); /// Whether the store service (e.g. Google Play Billing) is currently available on the device. Future isAvailable(); /// Queries the store for product details matching the catalog. Future> queryProducts(); /// Initiates purchase flow for a product. Future launchPurchaseFlow(String productId); /// Restores prior purchases from the store (e.g. on reinstall or new device). Future restorePurchases(); /// Acknowledges / completes an eligible purchase transaction with the store. Future completePurchase(StorePurchase purchase); /// Disposes listeners and resources. void dispose(); }