SDK

Flutter SDK

Unified SDK for Flutter — one package covers features, paywall, auth, and monitor.

Install

# pubspec.yaml: # dependencies: # onelo: # git: # url: https://github.com/onelo-tools/onelo-flutter-staging # ref: main

Initialize

import 'package:onelo/onelo.dart';

// Initialize once (e.g. in main or a provider). apiUrl and callbackScheme
// are REQUIRED — the SDK throws at init without them.
final onelo = Onelo(
  publishableKey: 'onelo_pk_live_YOUR_KEY',
  apiUrl: 'https://st.backend.onelo.tools',
  callbackScheme: 'myapp',
);

// Identify the user so per-user/per-plan targeting applies.
// (Skip if you use Onelo Auth — it's automatic after sign-in.)
await onelo.identify(userId);

Usage

// Features
final isEnabled = onelo.features.isEnabled('export-button');     // → bool
final status    = onelo.features.getStatus('export-button');     // → FeatureStatus enum

// Paywall — paid access is entitlement-based (automatic with Onelo Auth)
if (!onelo.auth.hasActiveAccess) {
  // show upgrade prompt
}

Install from GitHub — add to pubspec.yaml: onelo: { git: https://github.com/onelo-tools/onelo-flutter }

Your publishable key

Replace onelo_pk_live_YOUR_KEY with your key from the dashboard → SDK tab.

Flutter SDK — Onelo Docs