fix(lints): await asynchronous work in guarded blocks

This commit is contained in:
zarzet
2026-08-26 18:35:21 +07:00
parent 8f7b9ba47d
commit 778f58e6e4
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -2128,7 +2128,7 @@ class PlatformBridge {
try {
final contents = await file.readAsString();
if (contents.isEmpty) return null;
return _decodeJsonStringAsync(contents);
return await _decodeJsonStringAsync(contents);
} finally {
try {
await file.delete();
+1 -1
View File
@@ -100,7 +100,7 @@ Future<bool> openPendingExtensionVerification(
_log.w(
'Could not open verification challenge for $normalizedExtensionId',
);
return showExtensionVerificationHelpDialog(
return await showExtensionVerificationHelpDialog(
normalizedExtensionId,
uri,
browserMode: browserMode,
+2 -2
View File
@@ -49,8 +49,8 @@ String buildSafFileDisplayPath({
if (displayRoot != null) {
return [
displayRoot.replaceAll(RegExp(r'/+$'), ''),
if (cleanRelativeDir != null) cleanRelativeDir,
if (cleanFileName != null) cleanFileName,
?cleanRelativeDir,
?cleanFileName,
].join('/');
}
+1 -1
View File
@@ -905,7 +905,7 @@ class _AudioAnalysisCardState extends State<AudioAnalysisCard> {
final bytes = await file.readAsBytes();
final completer = Completer<ui.Image>();
ui.decodeImageFromList(bytes, completer.complete);
return completer.future;
return await completer.future;
} catch (_) {
return null;
}