The Dart language team is gradually approaching one of the most major releases - null-safety. Many market leaders have this feature, including Kotlin and TypeScript. For obvious reasons, this release cannot be made in the form of a switch: in one day and a simple update. A community that has picked up speed and released a huge number of packages will no longer be able to upgrade to the major version at the flick of a finger. Therefore, this process is progressive and not as fast as we would like. Nevertheless, there is no reason to doubt that the language will become much better and more convenient pretty soon!
We at Wrike could not ignore the Dart 2.10 release update and are translating an article from the official Dartlang blog .
New, unified dart
for all key tasks. And also an update on the null-safety timeline and migration principles.
:
Dart, 2.10 (two-dot-ten). Dart: , , , . null-safety, .
Dart
Dart Flutter SDK: , Flutter, , , . , Flutter ( flutter
), Dart (, dartfmt
dartanalyzer
). Dart 2.10 , dart
, flutter
. , , , , . , dart
:
Flutter Dart Flutter SDK. Flutter 1.22 SDK, <flutter-sdk>/bin
( PATH
) flutter
, dart
. Flutter, Dart, Flutter SDK
- .
Dart SDK ( ), , SDKdart
, ,PATH
.
dart
(dartdoc
, dartfmt
, dartanalyzer
..). 2021 Dart SDK, dart
. Dart , (CI), , - - , .
null-safety
null-safety , . null-safety null-, . , Understanding null safety. , the null safety video Flutter Day, .
null-safety ? :
Flutter 2: Flutter. , — , — Flutter , , , Flutter. null-safety Flutter Flutter. . .
-: , , . - , . , null-safety, , .
stable: - , stable. , . , null safety , , , pub.dev .
null-safety
null-safety.
,
, . , , null-safety — : Dart Flutter null-safety. null-safety , .
,
, “” . , C B, A, null-safety A, B, C. , A, B C , .
? , , API . , , . , , API, , , null-safe .
, . , , , null ( ), null ( ?
null ).
, , . - , , . , API null, , . .
— , — , null-safety. , , null-safety . null-safety null , null-safety , , , .
dart
SDK Dart 2.10 SDK Flutter 1.22. Flutter SDK, Dart SDK dart
, flutter upgrade
; Flutter 1.22 SDK, Dart 2.10. dart
, - .
null-safety. , , Flutter Flutter null-safety, . Flutter. null-safe Dart DartPad null-safety null-safety.