mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Null-assert the value given to a Completer expecting a non-null value (#136776)
The code with out the null assertion is legal as per the type signature, but will throw a runtime exception if the nullable value is null. To make this exception more explicit, the value must be null-checked before completing the completer with the value. The analyzer will soon enforce such checks. See https://github.com/dart-lang/sdk/issues/53253. Fixes https://github.com/flutter/flutter/issues/136775
This commit is contained in:
parent
189196d104
commit
25d2cdaab7
@ -964,7 +964,7 @@ class FlutterVmService {
|
||||
if (event.kind == vm_service.EventKind.kServiceExtensionAdded
|
||||
&& event.extensionRPC == extensionName) {
|
||||
isolateEvents.cancel();
|
||||
extensionAdded.complete(event.isolate);
|
||||
extensionAdded.complete(event.isolate!);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user