Hello fellow Dartisans! Welcome to the seventeenth 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
Pub repository field
If you haven't already and your package is open source, consider specifying the
repository field in your
pubspec.yaml file. The package analysis tools and the pub.dev site use the specified link to populate links on the package site and in the future may use it for git repository verification.
In Dart 2.19, using a colon (
:) to separate a named parameter from its default value will result in a warning by the analyzer. While most code should already use an equal sign (
=) already, make sure your code is migrated.
You can enable the
prefer_equal_for_default_values lint then use the
dart fix tool to automatically transition all current usages and avoid future ones.
- Building stable CLI apps
- Looking for users suffering from slow IDE / completion / analysis
- Looking for users experiencing long build_runner runtimes
- Announcing Flutter Web and Desktop support for AWS Amplify Storage, Analytics and API libraries
- Change to analyzer snapshots bumps dart binary size
- (Video) What is Dart? | Dart Explained in 2 Minutes For BEGINNERS
- (Video, Nov 22, 2022) Dart Frog on Flying High with Flutter
- package:bolt was released
A lightning fast, strongly typed network protocol.
- package:jb was released
A modern Java build system that leverages Dartle to make building Java projects easy.
- package:mastodon_api was released
The easiest and powerful Dart/Flutter library for Mastodon API.
- package:fredis was released
Redis client with simplicity and performance.
- package:igodo was released
A novel symmetric encryption algorithm implemented in Dart.
- package:steganograph was released
A pure Dart steganography library which supports hiding messages and files in images with an option to encrypt embedded secrets for more security.
- package:reactter v4.0.0 was released
- package:spider v4.1.0 was released
- package:pocketbase v0.5.0 was released
- package:dart_github_actions v0.5.0 was released
- package:mineral v2.0.0 was released
- package:supabase v1.2.0 was released
- package:nyxx v4.3.0 was released
Dart SDK updates
39 unique authors have contributed 125 commits to the Dart SDK in the past week.
The following are some handpicked, interesting changes:
- [analyzer] Complete completers when disposing
- [cfe] Patterns parsing: fix handling of builtin identifiers and pseudo-keywords
- [dart2wasm] Move low-level int/double intrinsics to base classes
- [vm/ffi] Add
- [dartdevc] Adding support for more Record nodes and core methods
- [analyzer] add UNNECESSARY_NAN_COMPARISON hint
- [dart2wasm] Implement function equality
- [vm] Replace Double_hashCode native method with graph intrinsic implementation
- [sdk] Add performance warnings to RegExp class
- [vm] Raise the limit on the number of classes
- [analyzer] Update SwitchExpression to th new state of the specification
- [dart2js] Add mmap-based read to dart2js for linux systems
Keep in mind, none of these changes are guaranteed to eventually land in a stable release.
Language updates and discussion
Specification and implementation work continues for records and patterns.
In terms of the specifications, the 2.17 release of the patterns specification was released this week with the following changes:
- Logical pattern syntax was changed to use
&&instead of just
&to avoid ambiguity around
- The precedence of a constant expression on right-hand side of a relational pattern was changed from
- A context type is now used when type checking map pattern key constant expressions
- If-case elements are now specified
- Some irrelevant specifications were removed
While not new this week, unnamed libraries have been implemented in the SDK and are set to be supported in Dart 2.19. Unnamed libraries allow users to document a library and associate metadata with a library without needing to decide on a library name.
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 package:meta!
package:meta is a package built by the Dart team providing a set of annotations to better express developer intentions that can't otherwise be deduced by statically analyzing source code.
Tools such as Dart's analyzer can use the information provided by the tools to provide feedback if your code violates intentions signaled by these intentions.
One popular example is the
@required annotation used to signal a named parameter was required before the introduction of the
required keyword. Another is
@immutable, which lets the analyzer warn you if a class with this annotation is not immutable. To learn more about many of the useful annotations provided, visit the API documentation of
package:meta on pub.dev.
These annotations can be used to improve code quality and avoid potential bugs, helping not only you as a developer but also the users of your libraries.
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.
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!
Quotes and notes
Share quotes and comments you see and hear about Dart on our quotes discussion board for future inclusion!
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!