Launch Sale

Flutter in Production is live!

Buy today and get ✨ 50% off ✨

View Course

June 2024: New Flutter Playlist, iOS Home Widgets, When your Backend is Not Ready, Custom Matchers

Welcome to my June Flutter newsletter!

This month, I have a nice roundup of things to share, including the newest Flutter Technique of the Week playlist, a curated list of community articles and videos, and the latest updates from Code with Andrea.

Let's dive in with the latest news from the Flutterverse!

New Flutter Playlist: Technique of the Week

The Flutter team has published a new playlist called Technique of the Week, aiming to explain useful topics and APIs in the Flutter SDK.

Three videos are already available, covering Dart Isolates, the Tween class, and the List.generate API.

For example, this video uses nice visuals to explain how to use tweens to animate properties between two possible states while delivering smooth animations at 60 frames per second:

Likewise, this video explains how code that takes too long to execute can block the UI thread, leading to dropped frames, and how to use isolates to solve this problem, using JSON decoding as an example:

Community Articles and Videos

One of Flutter's greatest strengths lies in its community. And every month, I keep finding great resources to share. Here are some of the latest articles and videos. 👇

📝 Automate Flutter Deployments to App Store and Play Store using Fastlane and Github Actions for a lazy developer

Automating the deployment of your apps to the stores can be a painful multi-step process that requires a lot of configuration. Worse, it needs to be repeated for each new app you create.

Fastlane and GitHub Actions can help you automate much of this process by taking care of environment variables, app versioning, running code generation, code signing, incrementing the build number, and much more.

If you just want to get things done, chances are this guide will help you:

📝 Flutter: iOS Home Widgets Deep Dive

If you ever wanted to create iOS Home widgets for your Flutter app but didn't know how, this guide will be handy.

Inside, you'll learn how to share data between the Flutter App and the Home Widget, including images and theme colors, and even how to render Flutter widgets inside the iOS widget.

While some native Swift and SwiftUI code is required, the setup is fairly easy:

📝 Common mistakes with Images in Flutter

When loading and rendering images, there are a few common mistakes that can impact your app performance.

These include using large image assets, failing to use WebP assets, using the Opacity widget when not needed, not precaching image assets, and not caching network images.

To learn how to avoid these pitfalls, read this article:

📹 "When Your Backend Is Not Ready" talk by Oleksandr Leushchenko at Full Stack Flutter 2024

Developing a Flutter app when the backend is not ready can be challenging.

Hardcoding your data is tempting but can lead to many problems. Better alternatives include creating a stub server, deploying a fake server within the app, or mocking a server.

This video covers all these techniques and provides practical examples of how to mitigate backend team delays on a new project:

📝 Macros, Static Metaprogramming, and Primary Constructors in Dart and Flutter

Of all the upcoming features in the Dart Language funnel, macros and primary constructors are certain to change how we write Dart and Flutter code.

As an example, this article highlights how we will write data classes and JSON serialization with far less code in the future:

Some Reddit users think that Flutter macros will be the greatest update ever, while others fear they will feel too much like magic. Personally, I very much welcome these new features and can't wait to get my hands on them.

📝 Custom Matchers

If you've ever written unit, widget, or integration test, you'll have used a Matcher - an object used to check if an "expected" value matches the "actual" value.

For simple tests, the built-in matchers are all you need. But for more complex ones, you might want to create custom matchers so you can more easily understand why an expectation failed.

To learn more about matchers and how to create custom ones, I highly recommend this article:

Community Packages

As the Flutter ecosystem continues to grow, more and more useful packages flourish. And this month, I want to share these ones with you. 👇

🧱 ARB Translate Package

Flutter app localization is usually done by creating ARB files for various languages (for example, app_en.arb for English and app_es.arb for Spanish).

But wouldn't it be cool if you could use Google Gemini or OpenAI ChatGPT to generate the missing translations in the ARB files?

Thanks to the new arb_translate package by LeanCode, you can!

To learn how to use it, head over to the package listing on pub.dev:

🧱 Flutter Deck

In December 2023, I covered flutter_deck, a package for crafting custom slide shows and presentations using Flutter.

Since then, the package has evolved significantly and added support for presenter view, speaker notes, and more. Just last week, I was using it to create the slides for my upcoming FlutterCon talk, and very much enjoyed using it.

Flutter deck is also great for embedding Flutter demos (or even an entire app!) inside your slides - it's all Flutter code after all! Check it out here:

Latest from Code with Andrea

Since the last newsletter, I've been sharing some new tips on X and LinkedIn and have also published my Flutter tips app on Flutter web at this link:

I've also been hard at work on my upcoming course about Flutter in Production, and, at the moment, this is taking up most of my time. While I'm very happy with how the course is shaping up, I've had less time for publishing my usual articles.

I'll share more details about the course over the next month, so stay tuned for updates. 👍

As previously announced, I will be a speaker at FlutterCon in Berlin (3-5 July). If you'll be attending, too, come and say hi! I'd love to connect and spend some time with the community!

Until then, happy coding!

Want More?

Invest in yourself with my high-quality Flutter courses.

Flutter In Production

Flutter In Production

Learn about flavors, environments, error monitoring, analytics, release management, CI/CD, and finally ship your Flutter apps to the stores. 🚀

Flutter Foundations Course

Flutter Foundations Course

Learn about State Management, App Architecture, Navigation, Testing, and much more by building a Flutter eCommerce app on iOS, Android, and web.

Flutter & Firebase Masterclass

Flutter & Firebase Masterclass

Learn about Firebase Auth, Cloud Firestore, Cloud Functions, Stripe payments, and much more by building a full-stack eCommerce app with Flutter & Firebase.

The Complete Dart Developer Guide

The Complete Dart Developer Guide

Learn Dart Programming in depth. Includes: basic to advanced topics, exercises, and projects. Last updated to Dart 2.15.

Flutter Animations Masterclass

Flutter Animations Masterclass

Master Flutter animations and build a completely custom habit tracking application.