mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 06:33:43 +08:00
fix: LocalizationUIModel downloadLocalizationFile wait flush
This commit is contained in:
parent
fb8ae2cb4f
commit
6f146ed84b
@ -280,7 +280,7 @@ class LocalizationUIModel extends _$LocalizationUIModel {
|
|||||||
"${URLConf.gitlabLocalizationUrl}/archive/${value.versionName}.tar.gz";
|
"${URLConf.gitlabLocalizationUrl}/archive/${value.versionName}.tar.gz";
|
||||||
final r = await RSHttp.get(downloadUrl);
|
final r = await RSHttp.get(downloadUrl);
|
||||||
if (r.statusCode == 200 && r.data != null) {
|
if (r.statusCode == 200 && r.data != null) {
|
||||||
await savePath.writeAsBytes(r.data!);
|
await savePath.writeAsBytes(r.data!, flush: true);
|
||||||
} else {
|
} else {
|
||||||
throw "statusCode Error : ${r.statusCode}";
|
throw "statusCode Error : ${r.statusCode}";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user