This Week in Dart - Issue 15
Hello fellow Dartisans! Welcome to the fifteenth 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
Releases
This week saw the release of Dart 2.18.4, a patch release with the following fixes and improvements:
- Fixed a crash during hot reload (Flutter issue #113540)
To learn how to update your Dart version, check out Get the Dart SDK or download the update from the Dart SDK archive.
Breaking changes
A breaking change request has also been made this week and is open for review and feedback:
Head to the linked issue to learn more about the potential breaking change, the reasoning behind it, its impact, and potential mitigations. Feel free to leave comments or concerns.
Generally the Dart team strives to not make breaking changes, and to preserve compatibility of all Dart programs across stable Dart SDK releases, but sometimes breaking changes are needed or justified. To learn more about this process, see Dart SDK breaking change process.
Community updates
Official
Discussions
- Intent to implement: dart:crypto
- Immutability: Dart vs. F#
- RiverPod 2 0 Update
- Request for feedback on IDE/completion/analysis performance
- Wouldn't it be nice if we could return after a null coalescence/ternary else operator?
Learning materials
- Dart – Type System
- Future & Task: asynchronous Functional Programming
- Flutter & Dart - The Complete Guide [2023 Edition]
- Reading CSV in Dart
Project releases
- package:type_graph was released
Build graphs of your type hierarchies in your Dart/Flutter apps. - package:ruqe was released
Brings the convenient types and methods found in Rust into Dart, such asResult
,Option
, pattern-matching, etc. - package:mapify was released
Package for converting objects to similar objects inline with clean architecture. - package:dart_windows_service_support was released
Support for running Dart as a Windows service - package:looter was released
A simple yet fully-featured web scraper for both static and dynamically generated web pages.
Project updates
- Dart Code (for VS Code) v3.52.0 was released
- package:dart_code_metrics v5.0.0 was released
- package:supabase v1.1.0 was released
- package:git v2.2.0 was released
- package:sass v1.56.0 was released
- package:sentry v6.14.0 was released
- package:query v2.1.0 was released
- package:either v0.3.0 was released
- package:rpi_gpio v0.8.0 was released
Dart SDK updates
38 unique authors have contributed 142 commits to the Dart SDK in the past week.
The following are some handpicked, interesting changes:
- [dart2wasm] Check bounds when allocating a list
- [analysis_server] Ensure code action fix priorities are respected even if de-duped
- [vm] Remove support for old native "
" syntax in VM - [vm] Fix coverage test regression
- [dart2wasm] Implement function tear-offs
- [VM/Service] Support records in the VM Service
- [vm] Specialize allocation for small records
- Fix for unnecessary string escape in a string interpolation
Keep in mind, none of these changes are guaranteed to eventually land in a stable release.
Language updates and discussion
View classes have not seen as much excitement around them as records and patterns, but work on the specification continues.
View classes can provide a replacement of the members available on instances of existing types, where the available members are determined by the static type. These can act as "zero-cost abstractions", not requiring a wrapping object.
This week saw a question about the potential of supporting simple union types through views. To learn more and comment, see language issue #2603.
To learn more about views, see the Views feature specification and to contribute to the surrounding discussion check out issues with the Views tag.
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 dart_code_metrics!
package:dart_code_metrics
is a static analysis tool that helps you analyse and improve your code quality, expanding on the basis provided by Dart's analyzer and linter!
It highlights a few core use cases:
- Reports code metrics
- Provides additional rules for the dart analyzer
- Checks for Dart anti-patterns
- Checks unused
*.dart
files - Checks unused l10n
- Checks unnecessary nullable parameters
- Can be used as CLI, analyzer plugin, or library
As development teams and projects get larger, it's useful to follow best practices, keep your code consistent, and avoid outdated, unnecessary, or unused code. Dart Code Metrics can help you achieve that, potentially increasing developer velocity on your project or even helping you avoid potential issues!
Their team is open to feedback and community contributions and are a great example of the Dart community pushing development with Dart forward for everyone.
To learn more about package:dart_code_metrics
and how to use it, see its page on the pub.dev site and its extensive documentation.
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!