Skip to content

[flutter_tools] Auto-detection of unsound null safety should fail for web dev builds #118331

@nshahan

Description

@nshahan

Any application that requires unsound null safety should be forced to pass an explicit flag when running flutter run -d chrome. Auto-detecting unsound null safety should be an error.

It sounds like this is working as intended for all implementations except development mode for the web (JS compiler).

I reproduction case should be to create an app and add a language version comment to the library that contains the entrypoint:

// @dart = 2.11

Then run flutter run -d chrome. It prints a warning but that should be an error.
Running with the explicit flag: flutter run -d chrome --no-sound-null-safety should still work with a warning.

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: null-safetySupport for Dart's null safety featurefound in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions