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

MethodAuthPublic keyNotes
getPaywall(paywallCode:)norequiredDefault main
registerUser(...)yesAfter auth login
registerDevice(...)yesStable installationId
getMyEntitlements()yesEntitlementSnapshot
hasEntitlement(code)yesConvenience
createPayment(...)yesrequiredPaid only
activateLicenseKey(...)yesKey redemption
getConfig / getFeaturesconfig: no / features: yesRemote flags
trackEvent(...)yesAnalytics
PaywallData.isFreePrice(i)Free detection

Free price helper

if (paywall.isFreePrice(0)) {
  // local free tier — no createPayment
}

Models

  • EntitlementSnapshotcodes, items, has(code), activePlans
  • PaywallData — raw map + helpers
  • PaymentResultpaymentId, confirmationUrl, amounts
  • RaidBossPlatformExceptionstatus, error, message

Call platform.close() when disposing a long-lived client if you own the HTTP client lifecycle.