The Flutter SDK
It is available in pub.dev (https://pub.dev/publishers/prelude.so/packages) and the code accessible in GitHub at https://github.com/prelude-so/flutter-sdk
Usage
The Flutter SDK enables your application to capture device signals that are sent to Prelude to enhance the fraud detection process. It also provides the functionality to allow your application to use the silent‑verification feature. Add the SDK to your Flutter application project by declaring it as a dependency in pubspec.yaml:Important: You will need the SDK key generated in the Prelude dashboard. The key is shown only once when it is created, so store it securely for later use.
Capturing Signals
To collect device signals simply create an instance ofPreludeFlutterSdk and call dispatchSignals.
The call returns a Future<String> that resolves to a dispatch ID which you should forward to your back‑end.
The SDK functions return Futures so the snippets listed here wrap them in async functions. Adjust to your code base accordingly.
The most basic usage is as simple as:
Tip: There is no need to keep an instance of the PreludeFlutterSdk()object. Instantiate it when needed and call the dispatchSignals function during your onboarding process.
Silent Verification
If you want to perform silent verification of a phone number, use theverifySilent method.
You must first have sent the signals and obtained a dispatchId.
When initiating the verification process with your backend, you send the dispatchId with the user's phone number. If silent verification is available for that number, you will get back in the verification response a url that you need to pass to the SDK so that it can proceed with the verification.
Note: Silent verification requires a server‑side component that forwards the request to Prelude, using the dispatchId you collected earlier. See the Silent Verification documentation for full details.