Breaking change [#51799]: Dart web libraries will null assert native APIs in Dart 3

132 views
Skip to first unread message

Srujan Gaddam

unread,
Mar 21, 2023, 12:18:29 PM3/21/23
to anno...@dartlang.org
Native web library APIs, like the ones in dart:html, will have their return values be null-asserted if they are non-nullable. We have compiler flags, "nativeNonNullAsserts" and "--native-null-assertions" in DDC and dart2js, respectively, to check this already. However, the default values of these flags were false. For Dart 3, the defaults will now be true.

For more information and details on how to turn this off if needed, see https://github.com/dart-lang/sdk/issues/51799.

Please comment on the bug if you have any questions or concerns. Thanks!
Reply all
Reply to author
Forward
0 new messages