This Week in Dart - Issue 14
Hello fellow Dartisans! Welcome to the fourteenth issue of This Week in Dart! This Week in Dart's aim is to be a useful collection of changes and news from across the Dart ecosystem and its surrounding community.
To contribute to this and future issues, feel free to contribute on GitHub or suggest content for next week on GitHub discussions.
To discuss this week's issue, feel free to join us on the Unofficial Dart Community Discord in the #this-week-in-dart
channel.
Announcements
While not new, we thought it would be worth calling out some experimental platform support that Dart has in progress and available in the beta
and dev
channels.
On those channels, versions 2.17.0-266 or later, you can now find experimental builds for RISC-V (RV64GC) on Linux.
Also on those channels, versions 2.18.0-66 or later, you can find experimental builds for ARM64 on Windows.
To download these builds, see the download links or instructions on the Dart SDK Archive.
If you experience any issues trying the latest experimental builds, make sure to report an issue to the Dart SDK with reproduction information.
Community updates
Official
Discussions
- Building long strings through concatenation is quadratic in complexity
- Do we need to ship the null safety migration tool in Dart 3.0?
Learning materials
- Dart abstract classes
- Dart Unmodifiable Views
- Dart Zones in 60 seconds
- Catch Exceptions in Flutter Like Never Before!
- Dart Future tutorial with examples
- Flutter Riverpod 2.0: The Ultimate Guide
Project releases
- package:injectable_http_service was released
Simple http service to use with injectable. - package:candies_lint was released
A plugin to help create custom lints quickly. - package:marked was released
A simple Markdown parser for Dart to create your own custom Markdown syntax.
Project updates
- package:endeavor v1.0.0 was released
- package:async v2.10.0 was released
- package:puppeteer v2.17.0 was released
- package:stream_chat v5.1.0 was released
- package:grpc v3.1.0 was released
- package:crypton v2.1.0 was released
- package:melos v2.8.0 was released
- package:mongo_dart v0.8.0 was released
- package:dart_jsonwebtoken v2.5.0 was released
Dart SDK updates
35 unique authors have contributed 132 commits to the Dart SDK in the past week.
The following are some handpicked, interesting changes:
- [vm] Allocation sinking of records
- Deprecate FallThroughError
- [vm/ffi] Outlining state transitions in AOT
- Enable the unnamed-libraries experiment by default in 2.19.0
- [dart2wasm] Check bounds in list [] and []=
- [vm, service] Include Smis in heap snapshots
- [cfe] Handle non-const records in const constructors
- Implement field promotion for the analyzer
Keep in mind, none of these changes are guaranteed to eventually land in a stable release.
Language updates and discussion
This week saw a standalone specification for sealed types, separate from the larger [type modifiers specification][], which is a proposal for expanded capability modifiers for classes and mixins.
Sealed types are essential for exhaustiveness checking, a core part of support for patterns.
At a high level, marking a type sealed
, prevents it from being directly constructed, and all subtypes must be defined in the same library. This allows all subtypes to be known, enabling exhaustiveness checking when matching on a value with the sealed type.
Records and other parts of patterns have also been seeing extensive implementation work across all parts of the SDK over the past month, and final touches around their language specifications alongside fixes and improvements have been made as well.
To learn more about and contribute to discussion of these and other potential changes to the Dart language, visit the Dart language repository.
Package of the week
The package of the week is the Dart build ecosystem, including packages such as package:build
and package:build_runner
.
The Dart build system provides a way of generating files using Dart code, where files are generated directly on disk and are incrementally built. It's used across the ecosystem in tools and libraries such as the underlying incremental Dart to JavaScript compilation used in package:webdev
through package:build_web_compilers
or for code generation in package:freezed
and package:json_serializable
.
The build system is flexible and extensible and even supports configuration through a build.yaml
file and package:build_config
. Consider using it for in your next code generation project, static site generator, or compilation tool.
To learn more about the Dart build system and how to use it, see package:build_runner
and package:build
on pub.dev as well its docs on GitHub.
Dart's package ecosystem is growing fast, and we want to help foster that growth. If you know of any great open source projects, let us know by suggesting a package on GitHub discussions.
Upcoming events
Check the Flutter Meetup Network and the Dart Language tag on Meetup to find an event near you or online and connect with other Dart developers!
Let us know about other future events on the events discussion board.
Quotes and notes
Share quotes and comments you see and hear about Dart on our quotes discussion board for future inclusion!
Dart jobs
If you know of any jobs which use or are related to Dart, let us know in the Job postings for Dart discussion board, and we will be happy to include them here!