Package raidboss_platform_sdk for Flutter / Dart clients.
Flutter — raidboss_platform_sdk
Install from Git (recommended for product apps)
dependencies:
raidboss_platform_sdk:
git:
url: https://github.com/ivanbalandin/RaidBossPlatform.git
path: packages/raidboss_platform_sdk
ref: main # or tag sdk-flutter-v0.1.3
Private repo (SSH):
dependencies:
raidboss_platform_sdk:
git:
url: git@github.com:ivanbalandin/RaidBossPlatform.git
path: packages/raidboss_platform_sdk
ref: main
flutter pub get
Install from path (local monorepo)
dependencies:
raidboss_platform_sdk:
path: ../RaidBossPlatform/packages/raidboss_platform_sdk
import 'package:raidboss_platform_sdk/raidboss_platform_sdk.dart';
Construct
final platform = RaidBossPlatformClient(
apiUrl: 'YOUR_API_URL',
applicationCode: 'YOUR_APP_CODE',
publicKey: 'YOUR_PUBLIC_KEY',
getAccessToken: () async => accessTokenOrNull,
);
Methods
| Method | Auth | Public key | Notes |
|---|---|---|---|
getPaywall(paywallCode:) | no | required | Default main |
registerUser(...) | yes | — | After auth login |
registerDevice(...) | yes | — | Stable installationId |
getMyEntitlements() | yes | — | EntitlementSnapshot |
hasEntitlement(code) | yes | — | Convenience |
createPayment(...) | yes | required | Paid only |
activateLicenseKey(...) | yes | — | Key redemption |
getConfig / getFeatures | config: no / features: yes | — | Remote flags |
trackEvent(...) | yes | — | Analytics |
PaywallData.isFreePrice(i) | — | — | Free detection |
Free price helper
if (paywall.isFreePrice(0)) {
// local free tier — no createPayment
}
Models
EntitlementSnapshot—codes,items,has(code),activePlansPaywallData— raw map + helpersPaymentResult—paymentId,confirmationUrl, amountsRaidBossPlatformException—status,error,message
Call platform.close() when disposing a long-lived client if you own the HTTP client lifecycle.