Installation
Flutter SDK for Reclaim Protocol
The Reclaim Protocol SDK for Flutter (android & iOS) applications is ready and available upon request. Contact our team to discuss implementation details.
A Flutter SDK for integrating Reclaim's verification system directly into your Flutter applications. This SDK allows you to verify user credentials and generate proofs in-app.
Features
- In-app verification flow
- Customizable verification options
- ZK Proof generation
- Compatible when using Flutter "Add to App modules" in your native applications
Prerequisites
- An Android application source code (Support for Android 5.0 or later).
- An Android device or emulator running Android 5.0 or later.
- A Reclaim account where you've created an app and have the app id, app secret.
- A provider id that you've added to your app in Reclaim Devtools.
Get an API Key
Setup your project using the Get API Key guide.
Installation
Add the following to your pubspec.yaml
:
Usage
Basic Setup
- Import the SDK in your Dart file:
- Initialize the SDK with your app credentials:
Following is an exmaple.
Starting Verification
Configuration Options
The ReclaimVerificationRequest
supports the following options:
appId
: Your Reclaim application IDproviderId
: The ID of the provider you want to verify againstsecret
: Your application secret (optional if using session information)sessionInformation
: Session information for authenticationcontextString
: Additional context for the verificationparameters
: Custom parameters for the verificationclaimCreationType
: Type of claim creation (standalone or meChain)autoSubmit
: Whether to auto-submit the verificationhideCloseButton
: Whether to hide the close buttonwebhookUrl
: URL for webhook notificationsverificationOptions
: Additional verification options
Error Handling
The SDK throws specific exceptions that you can handle:
Pre-warming
For better performance, you can pre-warm the SDK:
Example
Check out the example for a complete implementation.
Environment Variables
The SDK requires the following environment variables:
APP_ID
: Your Reclaim application IDAPP_SECRET
: Your application secretPROVIDER_ID
: The ID of the provider to verify against
You can provide these values using:
- Dart Define Env file:
--dart-define-from-file=./.env
- Hardcoded values (not recommended for production)
Stay Updated
- Join our Telegram community
- Follow @reclaimprotocol on Twitter
- Watch our GitHub repository