Documentation
/
SDK Reference
/
Frontend
/
Flutter
/
Hawcx Flutter SDK

Hawcx Flutter SDK

Bring Hawcx to Flutter using our production iOS and Android SDKs.

Overview

The Hawcx Flutter SDK delivers the same passwordless experience that powers our native apps. The plugin delegates all crypto and secure storage to the production Hawcx iOS and Android SDKs while giving you a single Dart API for authentication.

Hawcx Technology

One-click intelligent authentication that automatically determines user context

Contextual Intelligence

No more "Sign Up" vs "Sign In" confusion - just one smart entry point

Seamless Cross-Platform

Hawcx maintains user context across all devices and platforms

Enterprise-Grade Security

Production iOS cryptography and secure storage surfaced to Flutter

Client-Side Simplicity

Callbacks and helpers keep state handling lightweight in Dart

Unified Native SDKs

The Flutter bridge delegates to the same production Swift and Kotlin SDKs that power our mobile apps

Architecture

Loading diagram...

The Dart layer forwards every security-critical operation to the same HawcxSDK code that runs inside our production iOS and Android apps.

Quick Start

Add the package to your pubspec.yaml:

dependencies:
  hawcx_flutter_sdk: ^1.0.2

Then fetch packages:

flutter pub get

Requirements: Flutter 3.19+, iOS 17+, Android 8+ (minSdk 26).

The plugin depends on the Hawcx Android SDK published from our public Maven repository. Add it to your Gradle repositories:

android/settings.gradle(.kts)
dependencyResolutionManagement {
  repositories {
    maven {
      url = uri("https://raw.githubusercontent.com/hawcx/hawcx_android_sdk/main/maven")
      metadataSources {
        mavenPom()
        artifact()
      }
    }
    google()
    mavenCentral()
  }
}

If your project still uses android/build.gradle repositories, add the same maven { url ... } block there instead.

The plugin bundles the Hawcx iOS xcframework. After adding the package, run:

cd ios && pod install

No additional CocoaPods configuration is required.

import 'package:hawcx_flutter_sdk/hawcx_flutter_sdk.dart';

final client = HawcxClient();

Future<void> bootstrapHawcx() async {
  await client.initialize(HawcxConfig(
    projectApiKey: 'YOUR_CONFIG_ID',
    baseUrl: '<Base URL from Admin Console>',
  ));
}

baseUrl is unique to your environment. Find it in the Hawcx Admin Console under Project Settings, alongside your Config ID.

Do not pass OAuth client credentials to the mobile app. Your backend should redeem authorization codes using the Hawcx OAuth credentials we issued for your project.

Core Features

The Flutter SDK exposes the same authentication flow as our native apps: a single method (authenticate) handles login vs registration, and OTP collection happens only when the backend requires additional verification.

Troubleshooting