runAutoUpdate method
- String databaseID,
- DocumentReaderPrepareCompletion prepareCompletion,
- SuccessCompletion? successCompletion
Allows you to download a database from the Regula server. Each new update of the database will be downloaded.
databaseID
An identifier of the database.
prepareCompletion
A callback that returns downloading progress.
successCompletion
The block to execute after the download finishes.
Note: for convinience function returns Future<bool>
.
This is the same bool
that is returned by SuccessCompletion, indicating
whether the function has succeeded or not. If you don't need to handle
an error, you can leave successCompletion
as null
and only use the
return value of the function.
Implementation
Future<bool> runAutoUpdate(
String databaseID,
DocumentReaderPrepareCompletion prepareCompletion,
SuccessCompletion? successCompletion,
) async {
_setDocumentReaderPrepareCompletion(prepareCompletion);
return _successCompletionFromJson(
await _bridge.invokeMethod("runAutoUpdate", [databaseID]),
successCompletion,
);
}