update method
Updates current database by downloading a new JMdict.gz file. Defaults to downloading JMdict.gz file from http://ftp.edrdg.org/pub/Nihongo/JMdict.gz
Provide another archiveUri
if downloading from another source.
archiveUri
must point to a downloadable JMdict.gz file.
It is optional to apply download timeout
in seconds.
Implementation
Future<bool> update({
Uri? archiveUri,
int? timeout,
}) async {
if (!_checkInit() || _isLoading) {
_warnNotInitialized();
return false;
}
_isLoading = true;
try {
return _updater.update(
loader: _loader,
store: _store,
alternativeDownloadUrl: archiveUri?.toString(),
timeout: timeout,
);
} catch (ex) {
return false;
} finally {
_isLoading = false;
}
}