Usage
Flutter SDK for Reclaim Protocol
Quickstart
Import the SDK in your Dart file
Initialize the SDK with your app credentials
- You can get the
APP_IDandAPP_SECRETusing this guide - The
PROVIDER_IDis the proof you want the user to generate. You can see all the available providers here.
Starting Verification
Create a ReclaimVerification instance from your BuildContext:
Call startVerification() to begin the verification flow:
Pre-warming
For better performance, you can pre-warm the SDK before use:
Verifying proofs
The startVerification() method returns a ReclaimVerificationResult containing:
Proof Structure
Each proof (CreateClaimOutput) contains:
The data extracted will be available as a stringified JSON under claimData.extractedParameters.
Example Implementation
- Check out Examples for practical implementations
Advanced Options
Configuration Options
ReclaimVerificationRequest
Configure the verification request:
Parameters:
applicationId(required): Your Reclaim application IDproviderId(required): The provider ID to verify againstsessionProvider(required): Function that returns session informationcontextString(optional): Additional context for the verification, bound to the proof cryptographically (e.g. sessionIDs, timestamp etc. based on your custom business logic)parameters(optional): Map of key-value pairs that will be part of the proof, but not cryptographically bound
ReclaimVerificationOptions
Customize the verification behavior:
Available Options:
canAutoSubmit: Whether to automatically submit the verification when ready, and close the UI (default:false)isCloseButtonVisible: Show or hide the close button in the verification UI (default:true)canClearWebStorage: Clear webview storage like cookies before starting (default:true). Set tofalseif you want the user to not login each time they are creating the same proof.attestorZkOperator: Custom ZK operator for proof generationlocale: Force a specific locale (e.g.,'en_US','es_ES')
Context Strings
Add additional context to verifications that will be included in the proof:
Use Cases:
- Tracking verification purposes
- Binding verifications to specific actions
- Adding metadata to proofs
- Audit trails
Error Handling
The SDK throws specific exceptions that you should handle:
All Reclaim exceptions extend ReclaimException:
ReclaimException(base class)ReclaimVerificationCancelledExceptionInvalidRequestReclaimExceptionReclaimVerificationPlatformNotSupportedException
ReclaimVerificationDismissedExceptionReclaimVerificationSkippedExceptionReclaimSessionExceptionReclaimExpiredSessionExceptionReclaimInitSessionException
ReclaimVerificationProviderExceptionReclaimVerificationProviderNotFoundExceptionReclaimVerificationProviderScriptExceptionReclaimVerificationNoActivityDetectedExceptionReclaimVerificationRequirementExceptionReclaimVerificationProviderLoadException
Custom Parameters
Some providers require additional data to complete verification. You can provide these custom parameters:
Canceling Pending Verifications
If you need to cancel any pending verifications:
This is automatically handled when starting a new verification.
Performance optimization
For better performance, you can pre-warm the SDK:
Theming
The Reclaim SDK supports custom themes to match your app's branding. You need to be on the enterprise plan for custom themeing. After upgrading, you need to contact the Reclaim Protocol team to enable this for you.
Available Theme Properties
Once custom theming is enabled for your application, the following properties can be configured:
Colors
primary- Primary brand colorsecondaryColor- Secondary color for actionssurfaceColor- Background surface colorgreen- Success/verified state colorcardColor- Card background coloronCardColor- Text color on cardstermsNoticeColor- Terms notice text colorhyperlinkColor- Hyperlink colorsessionChipSurfaceColor- Session chip backgroundsessionChipOnSurfaceColor- Session chip text color
Custom Graphics
doneIconProvider- Completion iconfieldVerifiedIconProvider- Field verified iconfieldVerifyingIconProvider- Field verifying iconverificationCompleteIconProvider- Verification complete iconverifyScreenAppIconProvider- App icon on verify screenproviderToAppLoader- Loading animation between provider and apploading- General loading indicator
Background
background- Background decorationblurStrength- Background blur intensityblurColor- Background blur color overlay
Messages
returnToAppMessage- Message shown when returning to apptitle- Message titlesubtitle- Message subtitle
dataSharedMessage- Message shown after data is sharedtitle- Message titlesubtitle- Message subtitle
Parameters Display
parameterListStyle- How parameters are displayed (compact or expanded)dividerColor- Color of dividers between parametersisValueShown- Whether to show parameter values
Legal Links
termsAndConditionsUri- URL to your terms and conditionsprivacyPolicyUri- URL to your privacy policy
Other
cardElevation- Elevation for card componentsappIconGraphicOptions- Options for app icon display
Localization
The SDK includes built-in support for multiple languages.
Supported Languages
Currently supported locales:
- English (
en_US) - Default - Spanish (
es_ES)
The SDK automatically uses the device's locale if supported, falling back to English for unsupported languages.
Force a Specific Locale
You can force a specific locale for the verification flow:
Request Additional Language Support
If you need support for additional languages, please contact our support team. We can work with you to add new language translations to the SDK.
Session Management
Custom Session Control
Control whether verification can continue with custom logic:
Session Persistence
Store and reuse session information across app restarts:
WebView Configuration
Clear WebView Storage
Control whether to clear webview storage before verification:
Use Cases:
- Preserve login sessions across verifications
- Reduce re-authentication needs
- Speed up subsequent verifications
Default: true (storage is cleared before each verification)
UI Customization
Auto-Submit
Automatically submit when verification data is ready:
This skips the review step and submits immediately when data is collected.
Default: false
Hide Close Button
Remove the close button from the verification UI:
Useful For:
- Mandatory verification flows
- Preventing accidental dismissal
- Guided onboarding processes
Default: true
Platform-Specific Considerations
Android
Cronet for Devices Without Play Services
On devices without Google Play Services, add embedded Cronet:
iOS
Ensure minimum iOS version is set: