[isolate/nnbd] fix nnbd errors in dart:isolate

Named optionals without defaults should be nullable (or we need default).

Fixes:
output: org-dartlang-sdk:///dart-sdk/lib/isolate/isolate.dart:340:15: Warning: Optional parameter 'packageRoot' doesn't have a default value and its type 'Uri' doesn't allow null.
 - 'Uri' is from 'dart:core'.
          Uri packageRoot,
              ^^^^^^^^^^^
org-dartlang-sdk:///dart-sdk/lib/isolate/isolate.dart:525:15: Warning: Optional parameter 'response' doesn't have a default value and its type 'Object' doesn't allow null.
 - 'Object' is from 'dart:core'.
      {Object response, int priority = immediate});
Change-Id: I040939a4c058275d5e083a85b84317d76f7a568b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135040
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Auto-Submit: Vijay Menon <vsm@google.com>
This commit is contained in:
Vijay Menon 2020-02-11 19:46:34 +00:00 committed by commit-bot@chromium.org
parent 42e840c6ae
commit b288fc61d6

View file

@ -337,7 +337,7 @@ class Isolate {
bool? checked,
Map<String, String>? environment,
@Deprecated('The packages/ dir is not supported in Dart 2')
Uri packageRoot,
Uri? packageRoot,
Uri? packageConfig,
bool automaticPackageResolution = false,
@Since("2.3")
@ -522,7 +522,7 @@ class Isolate {
* are completed.
*/
external void ping(SendPort responsePort,
{Object response, int priority = immediate});
{Object? response, int priority = immediate});
/**
* Requests that uncaught errors of the isolate are sent back to [port].