The dust may have settled from the recent Flutter 3.3 release, but many exciting things have happened over the last few weeks:
- Riverpod 2.0 was released, along with a new Riverpod Generator package.
- Isar 3.0 was released.
- Work has started on some big Dart language features such as records, pattern matching, and destructuring.
We even had some controversy around the planned shutdown of Google Stadia, which stunned some indie developers, sparked a lenghty Reddit thread about the future of Flutter, and was handled very well by Tim Sneath on Hacker News.
So let's take a look at all the latest Flutter news! 👇
🧱 Riverpod 2.0 is Here
The 2.0 release packs in a lot of new stuff, and Riverpod is no longer considered a state management solution.
Instead, it's now a complete framework that lets you handle reactive caching and data-binding in your apps with simple and flexible APIs.
And with the introduction of the riverpod_generator package, you no longer have to write providers manually since Riverpod can now use build_runner to generate them on the fly.
As I write this newsletter, there are already some good resources you can use to learn more:
- 2.0.0 Changelog, covering all the main API changes
- Documentation site V2 (currently WIP)
- Updated official example apps, including a new pub.dev clone that shows all the new APIs in action
- Remi's talk at Flutter Vikings, covering the new syntax
- My Ultimate Guide to Riverpod 2.0
And I'm also working on two new articles covering the new Riverpod Generator in detail, so stay tuned for updates. 🔔
🧱 Isar 3.0 is Here
According to the official documentation, Isar is a super fast cross-platform database for Flutter.
It was created by Simon Leier, author of the very popular Hive package.
Isar is much more powerful than Hive and supports indexes, queries, full-text search, transactions, and many other features.
It works on all platforms (including Flutter web) and even ships with a database inspector that you can use to interact with the DB in real-time.
Head to the official docs to learn more (some YouTube tutorials are also included):
🎯 Dart Patterns and Related Features
The Dart language funnel is a great place to learn about what's coming next in Dart.
And recently, Patterns and related features have been moved to the "Being implemented" column.
The planned language improvements include pattern matching, destructuring, tuples (which enable multiple return values), and data classes.
If you've ever needed to use these features in Dart, chances are you resorted to packages like Freezed (which relies on code generation), dartz, or fpdart.
Here's a great thread showing the kind of code you'll be able to write once these features are available.
And if you want to go more in-depth and understand the full scope of these changes, check the official specifications:
These are big features, and I won't be surprised if they are still a few months away.
And I can't wait to cover them once they land. ⏳
Flutter Videos and Articles
Every month, I continue to be amazed by the videos the Flutter team makes for us. 👇
🎬 Equality In Dart
In particular, here's an excellent overview of equality in Dart by Craig Labenz:
🎬 Focus, Shortcuts, and Actions
If you're targeting Flutter on desktop or web, don't miss this three-part series about keyboard shortcuts and how to configure their behaviour.
Part 1 covers the Focus widget, which can be used to work with interactive sections of the UI (like buttons and text inputs):
For a more in-depth explanation, read: Understanding Flutter's keyboard focus system
Part 2 focuses on the Shortcut widget, which can be used to specify custom activators along with intents that describe the user's desired outcome:
Part 3 explains how you can use the Action widget to fulfill the intent:
Alongside the latest videos, I'd also like to feature this great article about Flutter code audits. 👇
📝 Flutter mobile app code audit
According to Wikipedia:
A software code audit is a comprehensive analysis of source code in a programming project with the intent of discovering bugs, security breaches, or violations of programming conventions.
When done rigorously, code audits tell us if a codebase is healthy, well-designed, and maintainable, and they can influence the future direction of a project.
So I enjoyed this great article by Daria Orlova, showing all the things you should consider when a client requests a code audit:
Latest on Code With Andrea
Since the last edition, I have published two in-depth articles. 👇
📝 Flutter Riverpod 2.0: The Ultimate Guide
In this extensive and up-to-date guide, I cover all the most important Riverpod APIs and concepts:
I'm also preparing a new article (and example app) showing how to use the new Riverpod Generator package, so stay tuned for updates.
📝 Flutter Bottom Navigation Bar with Nested Routes: GoRouter vs Beamer Comparison
Building a Flutter app with bottom navigation can be complex if you want to preserve the navigation stack inside each tab (known as stateful nested navigation).
Luckily, packages like GoRouter and Beamer make our life easier, and this article covers all the details:
Until next time
Thanks so much for reading this latest newsletter edition.
If you found this helpful, you can share it on Twitter.
And stay tuned for the next one!
Happy coding!