uflow_idflutter 1.0.0 copy "uflow_idflutter: ^1.0.0" to clipboard
uflow_idflutter: ^1.0.0 copied to clipboard

discontinuedreplaced by: uflowid

Flutter SDK for UFlow ID (id.uflow.uz) - email OTP auth without redirects, server-side subscriptions, and UFlow branded widgets.

uflow_idflutter #

Flutter SDK for UFlow ID (id.uflow.uz) β€” sign in with email OTP (no web redirect), check and activate subscriptions server-side, plus UFlow-branded widgets for a consistent look across UFlow apps.

Same Supabase project as id.uflow.uz website, so an email sign-in here creates the exact same account.

Features #

  • πŸ” Email OTP Auth - sendOtp(), verifyOtp(), no webview / redirect, pure in-app
  • πŸ’³ Server-side Subscriptions - entitlements live on id.uflow.uz, never on device
  • 🎨 UFlow Brand Kit - UFlowColors, uflowDarkTheme(), UFlowGradientButton, UFlowCard, UFlowLockOverlay
  • πŸ”„ Survives reinstall - subscription tied to UFlow ID account

Getting started #

Add to pubspec.yaml:

dependencies:
  uflow_idflutter: ^1.0.0
  supabase_flutter: ^2.8.0

Initialize in main():

import 'package:uflow_idflutter/uflow_idflutter.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await UflowId.initialize(
    supabaseUrl: 'https://YOUR-PROJECT.supabase.co',
    supabaseAnonKey: 'YOUR-ANON-KEY',
    apiBase: 'https://id.uflow.uz', // default
  );
  runApp(MyApp());
}

Use --dart-define in production:

--dart-define=SUPABASE_URL=... --dart-define=SUPABASE_ANON=...

Usage #

Auth (Email OTP) #

// 1. Send code
await UflowIdAuth.instance.sendOtp('user@example.com');

// 2. Verify 6-digit code
await UflowIdAuth.instance.verifyOtp('user@example.com', '123456');

// Check
if (UflowId.instance.isSignedIn) { ... }

// Sign out
await UflowIdAuth.instance.signOut();

Subscriptions (server-side) #

// Check if feature is active (server call with Bearer token)
final active = await UflowIdSubscriptions.instance.isActive('widgets_full');

// Fetch full object
final sub = await UflowIdSubscriptions.instance.get('widgets_full');
print(sub.active); // bool
print(sub.plan); // trial | full
print(sub.currentPeriodEnd);

// Activate (demo: server grants directly, prod: verify Play Billing via webhook)
await UflowIdSubscriptions.instance.activate('widgets_full', plan: 'full');
await UflowIdSubscriptions.instance.activate('widgets_full', plan: 'trial', periodDays: 3);

Entitlement is stored on id.uflow.uz - device uninstall / reinstall cannot lose or fake it.

Theming & Widgets #

MaterialApp(
  theme: uflowDarkTheme(),
  home: Scaffold(
    body: Column(
      children: [
        UFlowGradientButton(
          label: 'Upgrade Full Version',
          icon: Icons.workspace_premium,
          onPressed: () {},
        ),
        UFlowCard(
          child: Text('Feature row'),
        ),
      ],
    ),
  ),
)

if (!isFull) {
  Stack(
    children: [
      MyContent(),
      UFlowLockOverlay(onUnlock: openUpgrade),
    ],
  );
}

Brand colors:

UFlowColors.bg // #0B0D13
UFlowColors.surface // #12141C
UFlowColors.purple // #A21CF0
UFlowColors.green // #06D64A
UFlowColors.gradient // [blue, purple, green]

API Reference #

Class Description
UflowId Singleton config + Supabase client
UflowIdAuth sendOtp(email), verifyOtp(email, token), signOut()
UflowIdSubscriptions get(feature), isActive(feature), activate(feature, plan, periodDays)
UflowSubscription feature, active, plan, currentPeriodEnd

Additional information #

For full example see uflow_ios27widgets repo - free preview grid in Play Store, full unlock inside via UFlow ID.

1
likes
150
points
5
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter SDK for UFlow ID (id.uflow.uz) - email OTP auth without redirects, server-side subscriptions, and UFlow branded widgets.

Homepage
Repository (GitHub)
View/report issues

Topics

#authentication #subscription #supabase #uflow #otp

License

MIT (license)

Dependencies

flutter, http, supabase_flutter

More

Packages that depend on uflow_idflutter