Skip to content

Commit 853863b

Browse files
committed
chore(core): resolve unawaited_futures lint in app_dependencies
Resolves the `unawaited_futures` lint warning by wrapping the call to `_initializeDependencies()` with `unawaited()`. This makes it explicit that the future is intentionally not being awaited at this call site, as the logic is correctly handled by the `_initCompleter`.
1 parent 5593b0e commit 853863b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/config/app_dependencies.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ class AppDependencies {
9393
// initialization process.
9494
_initCompleter = Completer<void>();
9595
_log.info('Starting application dependency initialization...');
96-
_initializeDependencies();
96+
// We intentionally don't await this future here. The completer's future,
97+
// which is returned below, is what callers will await.
98+
unawaited(_initializeDependencies());
9799

98100
// Return the future from the completer.
99101
return _initCompleter!.future;

0 commit comments

Comments
 (0)