Hello fellow Dartisans! Welcome to the nineteenth 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
Dart 3 is scheduled for launch around mid 2023! The primary change is sound null safety will be required. There will also likely be some new features such as patterns and records, alongside some breaking changes.
To learn more about the path to Dart 3 as well as its planned features and breaking changes, checkout The road to Dart 3: A fully sound, null safe language.
Strict analyzer options
The Dart analyzer has long had support for a few "strong mode" options, including
--no-implicit-dynamic which reports an error if type inference chooses
no-implicit-casts which reports an error when a cast is made implicitly. These modes have been deprecated and are expected to be removed in Dart 3.
If you'd like these and other strict checks in your projects, you should migrate to the newer strict modes the analyzer supports. To learn more about their functionality and how to enable them, see Enabling additional type checks on dart.dev.
- Google's Dart language soon won't take null for an answer
- Interest Growing in Dart and Flutter for Mobile
- Go for Dart with Protocol Buffers
- Dart & Flutter with ChatGPT: Is it worth it?
- Join Tim Sneath's Dart private leaderboard for Advent of Code using Dart
- Kevin Moore's little update on dart2wasm progress
- Differences between Dart and TypeScript
- (Video) Dart's Variables and Data Types
- (Video) Operators in Dart
- (Video) Optionals in Dart
- (Video) Late Keyword in Dart
- (Video) Functions in Dart
- (Video) Control Flow in Dart
- (Video) Dart + Postgres - Observable Flutter
- (Guide) Building Full Stack apps using Flutter and Dart Frog
- (Guide) Dart Futures: Chaining and Concurrency
- (Docs) Concurrency on the web
- (Tips) Dart: code snippets for faster coding
- (Docs) JetBrains Space Private Dart Package Repository Support
- Zapp! December 22 Update (Dart-only mode)
- Google's Blockly has support for generating Dart
- OnePub Beta Announcement
- repl.it's Dart support updated to 2.18
- package:cli_completion was released
Completion functionality for Dart Command-line Interfaces built using CommandRunner.
- package:token_parser was released
Intuitive token parser that includes grammar definition, tokenization, parsing, syntax error and debugging.
- package:grpcgen was released
Command-line application for code generation for gRPC clients from gRPC Reflection.
- package:dart_frog_web_socket was released
WebSocket support for Dart Frog.
- package:burst was released
Lots of threading tools for executing jobs in parallel in various ways.
- package:base83 was released
Base83 encoding and decoding for Dart using the
- package:file_system_access_api was released
Library to expose the File System Access Api from web platform.
- package:at_chops was released
Package for at_protocol cryptographic and hashing operations.
- package:melos v2.9.0 was released
- package:faker v2.1.0 was released
- package:flutter_rust_bridge v1.54.0 was released
- package:moment_dart v0.13.0 was released
- package:units_converter v2.1.0 was released
- package:ferry v0.13.0 was released
- package:twitter_api_v2 v4.7.0 was released
- package:aws_s3_api v2.0.0 was released
Dart SDK updates
38 unique authors have contributed 121 commits to the Dart SDK over the past two weeks.
The following are some handpicked, interesting changes:
- [analyzer] Don't ask for subtypes for the same elements several times when searching for references
- [3.0 alpha] Bump version to 3.0.0
- [VM/runtime] Flip flag to make strong null safety the default
- [analysis_server] Improve Snippet performance with caching and earlier filtering
- [vm] Runtime type check in await
- [dart2wasm] Implement missing features in dynamic invocations
- [vm] Reorder fields on Thread to reduce code size on X64
- Begin implementing flow analysis for patterns
- [ddc] Add support for new native types
- analysis_server: quick fixes for records
Keep in mind, none of these changes are guaranteed to eventually land in a stable release.
Language updates and discussion
The last week saw continued work on records and patterns in the SDK and its various tooling and compilers.
Give records a shot with a dev build of the SDK and by enabling the
records experiment. To learn how to enable experiments, see Using experiment flags with command-line tools and Using experiment flags with the Dart analyzer.
In other news, what was previously known as view classes, has been renamed to inline classes along with some other changes.
Inline 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 wrapper object.
To learn more about or comment on inline classes, see the Inline classes feature specification PR.
To learn more about and contribute to discussion around other potential changes to the Dart language, visit the Dart language repository.
Package of the week
The package of the week is package:isolate_agents!
package:isolate_agents is a package intended to make long-living isolates easier to work with.
The package introduces an
Agent class, implementing the actor model for Dart, enabling easier concurrent processing with a built-in mechanism for communication.
To learn more about the package's background and functionality, check out the blog post isolate_agents: Easy Isolates for Flutter. For general information about concurrency, see Concurrency in Dart.
The package has not yet had a stable release and is looking for feedback on the design and implementation.
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.
Quotes and notes
Share quotes and comments you see and hear about Dart on our quotes discussion board for future inclusion!
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 future events on the events discussion board to include here!
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!