submitDetections method
Submits any pending SDK detections to the Sentiance API.
This method will bypass any network quota limitation set for the SDK. A typical use case would be when the enclosing app determines that there are too many detections on disk that have not yet been submitted.
You must have initialized the SDK before invoking this function.
Throws a PlatformException if an error occurs when communicating with the host platform.
Throws a SubmitDetectionsError if the SDK fails to submit detections.
Example:
try {
await submitDetections();
} on PlatformException catch(e) {
// An error occurs when communicating with the host platform.
} on SubmitDetectionsError catch(e) {
// Failed to submit detections, find out more about the reason why
final reason = e.reason;
}
Implementation
Future<void> submitDetections() async {
return _api.submitDetections().catchSentianceErrorAndRethrow(
SubmitDetectionsError.fromNativeErrorMap);
}