Flutter SDK
Usage
Flutter SDK for Reclaim Protocol
- 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:
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)
Example
Check out the example for a complete implementation.