API Documentation
/
Frontend
/
Flutter
/
Hawcx Flutter SDK with Smart Connect

Hawcx Flutter SDK with Smart Connect

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

Overview

The Hawcx Flutter SDK delivers the same Smart Connect 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.

Smart Connect 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

Smart Connect 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_PROJECT_API_KEY',
    baseUrl: 'https://your-tenant.hawcx-api.hawcx.com',
  ));
}

baseUrl must be the scheme + host that Hawcx provisioned for your tenant (for example https://hawcx-api.hawcx.com). Do not append /hc_auth; the native SDK adds endpoint paths automatically.

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 Smart Connect 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