Dart 2.15

Release Dart 2.15

Recently, Google launched version 2.15 of their programming language Dart. Some new features include constructor tear-offs and improved enumerations.

What is Dart?

Dart is an object-oriented, open-source programming language developed by Google. Since its first stable release in 2011, Dart has undergone many changes. Version 2 introduced a static type system. The programming language is also used in Flutter, Google’s mobile framework.

What is special about Dart?

Unlike many languages, Dart is created with the aim of making the development process as comfortable and fast as possible for developers. Therefore, it comes with a fairly comprehensive set of built-in tools, such as its own package manager, several compilers/transpilers, a parser, and a formatter. Also, the Dart virtual machine and Just-in-Time build make code changes immediately executable. Once in production, the code can be compiled into a number of native languages, so no special environment is required to run it. In the case of web development, Dart is converted into JavaScript.

Applications for Dart?

Dart is a general-purpose language that you can use for frontend-, mobile- and back end-applications

  • Among other things, in web applications, by using dart:html and the transpiler, you can convert the Dart code into JavaScript, or by using frameworks like AngularDart. 
  • To develop backend applications you can use dart:html and dart:io or opt for frameworks such as Aqueduct. 
  • For mobile applications, you can use the Flutter framework.

Constructor Tear-offs

Function tear-offs already existed in Dart. In case the lambda parameter(s) and the following function call each had the same signature, you could write it shorter.

Function tear-offs already existed in Dart. In case the lambda parameter(s) and the following function call each had the same signature, you could write it shorter.

Dart 2.15 adds the same functionality when calling constructors.

Dart 2.15 adds the same functionality when calling constructors.
Dart 2.15 adds the same functionality when calling constructors.

It can also be used with named constructors.

It can also be used with named constructors.

Improved Enums

The Dart team has also made some improvements to the enumeration API. You can call the getter .name to get the String value of an enum value.

The Dart team has also made some improvements to the enumeration API. You can call the getter .name to get the String value of an enum value.

It is now also possible to search for an enum value by name.

It is now also possible to search for an enum value by name.

Finally, you can also map the value of an enum to name-value pairs.

Finally, you can also map the value of an enum to name-value pairs.

You can find more information on this and other new additions at: https://dart.dev/guides/whats-new

A PWA, excuse me?

Read more

Appbuilders: A great conference at the Lugano lake

Read more
Appbuilders: A great conference at the Lugano lake

Flutter 2.8

Read more
Flutter 2.8