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(...)yes—After auth; does not upgrade legal versions
getMyConsents / acceptConsentsyes—Explicit accept of new versions
updateUserProfile(...)yes—After name/avatar change
registerDevice(...)yes—Stable UUID installationId → “Devices active”
getMyEntitlements()yes—EntitlementSnapshot
hasEntitlement(code)yes—Convenience
createPayment(...)yesrequiredPaid only
syncPayment(paymentId)yes—After YooKassa return
activateLicenseKey(...)yes—Key redemption
getConfig / getFeaturesconfig: no / features: yes—Remote flags
getApplicationBranding()norequiredApp icon + website
getBanner / listBannersnorequiredApp HTML banners
getSiteBanner / listSiteBannersnorequiredCMS site banners
trackEvent(...)yes—Analytics; with installationId+platform also heartbeats device
PaywallData.isFreePrice(i)——Free detection

Free price helper

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

Models

  • EntitlementSnapshot — codes, items, has(code), activePlans
  • PaywallData — raw map + helpers
  • PaymentResult — paymentId, confirmationUrl, amounts
  • RaidBossPlatformException — status, error, message

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