enum

TargetPlatform

android

fuchsia

iOS

linux

// new value

macOS

windows

// new value

And the platform test setting
debugDefaultTargetPlatformOverride in main()
is no longer required on Linux and Windows.

This can cause the Dart analyzer to give the
missing_enum_constant_in_switch warning for
switch statements that don’t include a default case.
Writing a switch without a default: case is the
recommended way to handle enums, since the analyzer
can then help you find any cases that aren’t handled.

Migration guide

In order to migrate to the new enum, and avoid the analyzer’s
missing_enum_constant_in_switch error, which looks like:

or

Modify your code as follows:

Code before migration: