What's being deprecated?
Top level constants in the Dart 1 core libraries were named using an all caps naming convention:
const JsonCodec JSON = const JsonCodec();
This is inconsistent with standard Dart style. In Dart 2, we have (already) added camel case versions of constants to the library, and we are now deprecating the old constants.
const JsonCodec json = const JsonCodec();
@Deprecated("Use json instead")
const JsonCodec JSON = json;
What will break?
Nothing, but you may get new deprecation warnings from the analyzer if you use the old constant names.
info: 'JSON' is deprecated and shouldn't be used. (deprecated_member_use at scratch.dart:12)
How do I get rid of the deprecation warnings?
Use the new constant names (generally just the camel case version of the old name).
You can also use "go to definition" in the IDE to go to the definition of the old constant, which references the new name.
Why is this change being made?
SCREAMING CAPS ARE INCONSISTENT WITH STANDARD DART STYLE, AND DON'T LOOK VERY GOOD EITHER.
When will the old constants go away?
We hope to remove the old constants in a future release, but because of the very breaking nature of this change we do not anticipate doing this for the Dart 2 release. We plan to continue to work towards removal of the old constants in a future release, possibly with automated tooling to help with the migration.
This has landed in bleeding edge, and will be released in the next Dart SDK version (probably 2.0.0-dev.34.0) and rolled into Flutter bleeding edge shortly thereafter.
As usual, please reach out to me here or offline with any concerns, and/or with help resolving any issues after this change has landed.
thanks,
-leaf