The Dart 2.7 SDK has been released. Dart is a client-optimized programming language designed by Google. The latest release is meant to be “a safer, more expressive” version of Dart.
Version 2.7 comes with added support for extension methods, a new package for handling strings with special characters, an update on null safety and a new null safety playground experience in DartPad.
RELATED CONTENT: Google’s Flutter to focus on ambient computing
The new extension method support allows developers to add new functionality to any type and have the brevity and auto-complete experience of regular method calls. Extension methods are resolved and dispatched statically, which means users can’t call them on values whose type is ‘dynamic,’ Michael Thomsen, product manager for Dart and Flutter, wrote in a post.
“We call the feature extension methods because that’s familiar terminology if you’ve used the corresponding language feature in other programming languages,” Thomsen wrote. ”But in Dart the feature is more general: it also supports extending classes with new getters, setters, and operators.”
In addition, the new characters package supports strings viewed as sequences of user-perceived characters (Unicode grapheme clusters) to handle cases that require iterating over the characters of a string or manipulating the contents of a string, the team explained.
The team also said they are working on completing a first beta release of null safety in the Dart SDK. The null safety playground is a special build of DartPad that contains a technical preview of the static analysis part of the null safety feature.
A new Like feature has also been added for packages to allow users to indicate which packages they’re fond of.
Dart 2.7 is available now as an SDK download from dart.dev, and it’s also built into the Flutter 1.12 release.
“2019 has been an incredibly exciting year for Dart, but we’re not stopping here. We have bold plans for 2020, including shipping stable versions of features like dart:ffi and null safety and introducing new features,” Thomsen wrote.