loadBlinkIdSdk method
The loadBlinkIdSdk platform channel method creates or retrieves the instance of the BlinkID SDK.
Initializes and loads the BlinkID SDK if it is not already loaded.
This method handles:
- SDK initialization
- Resource downloading
- License verification
It ensures that only one SDK instance exists at any time.
You can call this method in advance to preload the SDK before starting a scanning session.
Doing so reduces loading time for the `performScan` and `performDirectApiScan` methods,
since all resources will already be available and the license verified.
If you do not call this method beforehand, it will still be automatically invoked on the native platform channels when a scan starts. However, the initial scan may take longer due to resource loading and license checks.
It takes the following parameter: BlinkIdSdkSettings.
BlinkID SDK Settings - BlinkIdSdkSettings: the class that contains all of the available SDK settings. It contains settings for the license key, and how the models, that the SDK needs for the scanning process, should be obtained. To obtain a valid license key, please visit https://developer.microblink.com/ or contact us directly at https://help.microblink.com
Implementation
@override
Future<void> loadBlinkIdSdk(BlinkIdSdkSettings blinkidSdkSettings) async {
await methodChannel.invokeMethod(ARG_LOAD_BLINKID_SDK, {
ARG_BLINKID_SDK_SETTINGS: jsonDecode(jsonEncode(blinkidSdkSettings)),
});
}