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
# ref: mainInitialize
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://api.onelo.tools', callbackScheme: 'myapp', ); // Sign the user in with Onelo Auth (see the Auth snippet). Every module then // acts for the signed-in user automatically — there is no identify() call to // make.
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.