initialize method
Allows you to initialize FaceSDK.
config
- configuration file for FaceSDK initialization.
Returns bool indicating success of initialization and a nullable InitException.
Implementation
Future<(bool success, InitException? error)> initialize({
InitConfig? config,
}) async {
var response = await _bridge.invokeMethod("initialize", [config?.toJson()]);
await _onInit();
var jsonObject = _decode(response);
bool success = jsonObject["success"];
var error = jsonObject["error"];
return (success, InitException.fromJson(error));
}