mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-04 01:00:44 +02:00
fix(lints): await asynchronous work in guarded blocks
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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('/');
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user