fix: LocalizationUIModel downloadLocalizationFile wait flush

This commit is contained in:
xkeyC 2024-05-08 10:50:52 +08:00
parent fb8ae2cb4f
commit 6f146ed84b
2 changed files with 2 additions and 2 deletions

View File

@ -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}";
} }

View File

@ -38,4 +38,4 @@ class PartyRoomUI extends HookConsumerWidget {
), ),
); );
} }
} }