Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid passing a nullable value to Future<nn-type>.value or Completer<…
…nn-type>.completer. This is cleanup work required to start enforcing this with static analysis, as per dart-lang/sdk#53253. Real quick this issue is that this code is unsafe: ```dart void f(Completer<int> c, int? i) { Future<int>.value(i); // Ouch! c.complete(i); // Ouch! } ``` This change should be a no-op. Adding this explicit null-assert ensures that any exception is thrown right at the null-assert.
- Loading branch information