Hyphen
  • Hyphen
  • Concepts
    • Auth Methods
    • Hyphen Multi-Sig Account
      • Device Key
      • Recovery Key
      • Server Key
    • Paymaster
    • Hybrid Custody
  • Mechanism Paper
  • iOS SDK
    • Quick Start
    • Authenticating Users
    • Using Hyphen UI Kit
      • Account Management Screen
    • Sample Project
  • Android SDK
    • Quick Start
    • Authenticating Users
    • Handling 2FA / Transaction Request
    • Using Hyphen UI Kit
    • Sending Transactions
  • Flutter SDK
    • Quick Start
    • Authenticating Users
    • Using Hyphen UI Kit
    • Sending Transactions
    • Example App
  • Hybrid Custody
    • Into the Hybrid Custody
  • Without Using SDK
    • Authenticating Users
    • Handling 2FA Push
  • REST API
    • API Reference
      • Account
      • Auth
      • Device
      • Key
      • Sign
    • Swagger
Powered by GitBook
On this page
  • Create an App in the Dashboard
  • Installing the SDK
  • Initializing the SDK

Was this helpful?

  1. Flutter SDK

Quick Start

Get Started with the Hyphen Flutter SDK

PreviousSending TransactionsNextAuthenticating Users

Last updated 1 year ago

Was this helpful?

Create an App in the Dashboard

You need to create an app in the before using Hyphen SDK. After creating an app, an app secret will be issued. The app secret is required to initialize the SDK.

Installing the SDK

  1. Open your project's pubspec.yaml file.

  2. Add Dependency: Under the dependencies section of your pubspec.yaml file, add the "hyphen_flutter_sdk" plugin as follows:

dependencies:
  flutter:
    sdk: flutter
  hyphen_flutter_sdk: ^1.0.0

Replace ^1.0.0 with the desired version of the plugin. The ^ symbol indicates that your project can use any compatible version greater than or equal to the specified version.

  1. Run flutter pub get: After adding the dependency, save the pubspec.yaml file, and run the following command in your terminal to fetch the plugin:

flutter pub get

This command will download the plugin and its dependencies into your Flutter project.

Initializing the SDK

Initialize the Hyphen SDK within your Flutter app's main.dart file or in the initialization code of your Flutter app. Here's an example of how you might initialize the SDK:

import 'package:flutter/material.dart';
import 'package:hyphen_flutter_sdk/core/hyphen.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  Widget build(BuildContext context) {

    // Initialize the Hyphen SDK
    Hyphen.initialize(context);
    Hyphen.appSecret = "<YOUR-APP-SECRET>";
    Hyphen.network = NetworkType.TESTNET;

    return MaterialApp(
      title: 'My App',
      home: MyHomePage(),
    );
  }
}
Hyphen Dashboard