Skip to main content
Platform support: The Flutter SDK currently supports iOS and Android only. Web and desktop platforms are not supported at this time.

Key Features

Authentication

Users can sign in using familiar methods like email OTP, SMS OTP, social providers (Google, Apple, Discord, Farcaster, GitHub, Twitter, Facebook), or external JWT. The SDK handles all the complexity of OTP generation, verification, and session management.

Multi-Chain Embedded Wallets

Create non-custodial wallets for your users instantly. The SDK supports both EVM chains (Ethereum, Polygon, Base, etc.) and Solana, with wallets secured by advanced MPC technology.

Blockchain Integration

Full EVM and Solana integration with support for custom networks, gas management, transaction handling, and smart contract interactions. Users can send tokens, sign messages, and interact with contracts through the web3dart and Solana packages.

Built-in UI Components

Pre-built authentication flows and user profile screens that handle the complexity of user onboarding. Or build your own custom UI using the SDK’s programmatic API.

Flutter Integration

Native Flutter support with Stream-based reactive state management. The SDK provides streams for authentication state, wallet updates, and more, integrating seamlessly with Flutter’s reactive patterns.

Architecture Overview

The Dynamic Flutter SDK is built with modern Flutter practices:
  • Singleton Pattern - Access SDK through DynamicSDK.instance after initialization
  • Stream-based Reactivity - Reactive streams for state changes (tokenChanges, authenticatedUserChanges, userWalletsChanges)
  • Type Safety - Full Dart type safety with comprehensive error handling
  • Async/Await - Modern Dart concurrency for smooth user experiences
  • Built-in UI - Pre-built authentication and profile UI components
  • Modular Architecture - Separate packages for EVM (web3dart) and Solana blockchain interactions

Prerequisites

Getting Started

Wallet & Blockchain

Flutter-Specific Features

Advanced Features

πŸ“± Complete Example App: Check out the Flutter SDK Example App for a fully functional Flutter app demonstrating all SDK features including authentication, wallet management, social login, EVM/Solana transactions, and blockchain integration.

Quick Example

import 'package:dynamic_sdk/dynamic_sdk.dart';
import 'package:flutter/material.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize the SDK
  DynamicSDK.init(
    props: ClientProps(
      environmentId: 'your-environment-id',
      appLogoUrl: 'your-logo-url',
      appName: 'your-app-name',
    ),
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Stack(
        children: [
          // Wait for SDK to be ready
          StreamBuilder<bool?>(
            stream: DynamicSDK.instance.sdk.readyChanges,
            builder: (context, snapshot) {
              final sdkReady = snapshot.data ?? false;
              return sdkReady
                  ? const HomePage()
                  : const Center(child: CircularProgressIndicator());
            },
          ),
          // Dynamic SDK widget overlay
          DynamicSDK.instance.dynamicWidget,
        ],
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: StreamBuilder<String?>(
          stream: DynamicSDK.instance.auth.tokenChanges,
          builder: (context, snapshot) {
            final authToken = snapshot.data;

            // Show different UI based on authentication state
            return authToken != null
                ? Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      const Text('βœ“ Authenticated'),
                      const SizedBox(height: 16),
                      ElevatedButton(
                        onPressed: () => DynamicSDK.instance.ui.showUserProfile(),
                        child: const Text('View Profile'),
                      ),
                      ElevatedButton(
                        onPressed: () => DynamicSDK.instance.auth.logout(),
                        child: const Text('Logout'),
                      ),
                    ],
                  )
                : ElevatedButton(
                    onPressed: () => DynamicSDK.instance.ui.showAuth(),
                    child: const Text('Sign In with Dynamic'),
                  );
          },
        ),
      ),
    );
  }
}

What’s Next?

Ready to get started? Follow our quickstart guide to integrate Dynamic into your Flutter app in minutes.