diff --git a/lib/src/utils/multilock.dart b/lib/src/utils/multilock.dart index cc2973b8..035232ef 100644 --- a/lib/src/utils/multilock.dart +++ b/lib/src/utils/multilock.dart @@ -1,4 +1,3 @@ -// @dart=2.9 /* * Famedly Matrix SDK * Copyright (C) 2019, 2020, 2021 Famedly GmbH @@ -40,7 +39,7 @@ class MultiLock { if (_completers[key] != null) { futures.add(() async { while (_completers[key] != null) { - await _completers[key].future; + await _completers[key]!.future; } }()); } @@ -60,7 +59,7 @@ class MultiLock { // we just have to simply unlock all the completers for (final key in uniqueKeys) { if (_completers[key] != null) { - final completer = _completers[key]; + final completer = _completers[key]!; _completers.remove(key); completer.complete(); }