This week in Flutter #51
The Flutter team announced the winners of the Flutter Puzzle Hack. I am happy to see that one of my favorites won the third prize for Best Animation / Design.
How did your submission go? Let me know in the comment section below.
- Michele Volpato
🔗 Error handling in Dart and ErrorOr
Erlend created a new package that expresses the
return type of an async function as a possible error, in case that function throws. It saves you from having a non-final
variable outside of a
try-catch block. A concept similar to Swift’s Result type.
🔗 Data layer in Flutter V2 | Use the Repository Pattern to keep a local copy of your API data
David Serrano Canales updates his article about using the repository pattern to save a cache version of some remote data in the device. He improved the article by including some packages and plugins. The amount of code that needs to be written is reduced, at the expense of added dependency to third-party libraries. All the added packages are well-known and well-maintained, so adding them should not be a problem.
🔗 Widget testing: Dealing with Renderflex Overflow Errors
In case you want to ignore “RenderFlex overflowed” errors during widget tests, you can follow this article by Reme Le Hane that builds on an (old) answer by Remi Rousselet.
🔗 How to update a Map of key-value pairs in Dart
Quick tip by Andrea Bizzotto on using the
update() method on Dart’s dictionaries. In case
you missed it.
🔗 Flutter isolates – everything you need to know
Are you having problems understanding isolates? Read this well-written article by Jahswill Essien on the Codemagic blog.
🔗 Riverpod 2.0 – Complete Guide (Flutter Tutorial)
Matt Rešetár released a full tutorial on Riverpod 2.0. If you need a refresh on Riverpod, or you are in the process of deciding which state management and dependency injection solutions to use in your app, this is a good reading for you.
🔗 Use GraphQL Codegen to reduce boilerplate code
Christian Budde Christensen increased usability of graphql_codegen package. Read more about it in this article.
🔗 Flutter – Using Google Cloud Functions with parameters
Bart van Wezel improves on a previous article on calling Google Cloud Functions from Dart by adding parameters.
🔗 Using New Relic to Ingest Flutter Logs
New Relic is a monitoring platform for apps and services. In this article, Tanner Marks integrates a Flutter app logs in to New Relic. I always used Firebase Crashlytics for collecting crashes and errors. It is not meant to collect normal logs, so having an easy to set up alternative for them is a good idea.
That’s it for this week.
If you want to comment on any of this week’s entries, you can do it in the comment section below.
Have a bug-free week,
- Michele Volpato