Flutter Articles

All my in-depth articles about Dart, Firebase & Flutter.

Flutter Articles
How to Build and Deploy a Dart Shelf App on Globe.dev

How to Build and Deploy a Dart Shelf App on Globe.dev

#dart
#flutter
#shelf
#security
#backend

Learn how to build and deploy a Dart Shelf App that taps into the OpenAI API without exposing the API key in your Flutter client.

How to Build a Robust Flutter App Initialization Flow with Riverpod

How to Build a Robust Flutter App Initialization Flow with Riverpod

#dart
#flutter
#state-management
#riverpod

Some useful Riverpod techniques you can use to initialize async dependencies, show some loading UI, and handle errors during app startup.

How to Publish your Flutter Web Apps on GitHub Pages for Free

How to Publish your Flutter Web Apps on GitHub Pages for Free

#dart
#flutter
#flutter-web

A step-by-step tutorial showing how to deploy your Flutter web apps to GitHub Pages using Makefiles.

How I Built a Modern Course Platform in 2024

How I Built a Modern Course Platform in 2024

#astro
#supabase
#typescript

An overview of the technologies I used, challenges I faced, and insights I gained from shipping Code With Andrea Pro, my new course platform.

We Need To Talk About FlutterFlow

We Need To Talk About FlutterFlow

#dart
#flutter
#flutterflow

Is FlutterFlow the real deal? Or should you ignore it and continue building apps the old-fashioned way? Here's my take as an experienced developer.

GitHub Copilot: Tips and Tricks for Flutter Devs

GitHub Copilot: Tips and Tricks for Flutter Devs

#dart
#flutter
#ai

A tour of the new Copilot features. Learn how its AI assists with code, tests, and commits, and find out if it's right for your Flutter projects.

Flutter Deep Linking: The Ultimate Guide

Flutter Deep Linking: The Ultimate Guide

#dart
#flutter
#navigation
#gorouter

A step-by-step tutorial showing how to implement deep links in Flutter using GoRouter, including the native Android and iOS platform setup.

When to use Realtime Updates vs One-Time Reads in Your Flutter Apps

When to use Realtime Updates vs One-Time Reads in Your Flutter Apps

#dart
#flutter
#firebase
#riverpod

Find out when to use one-time reads and when to switch to realtime updates in Flutter development for optimal app performance and user experience.

8 Steps to Follow When Building Your Next Flutter App

8 Steps to Follow When Building Your Next Flutter App

#flutter
#firebase
#productivity

A helpful guide for your next Flutter app, providing insights from UX flows selection to GitHub boards and processes for efficient execution.

What are Webhooks and How to Use Them in Your Flutter Backend

What are Webhooks and How to Use Them in Your Flutter Backend

#dart
#flutter
#firebase
#cloud-functions

An introduction to webhooks for Flutter developers, showing how to create, register, and secure a Stripe webhook using Firebase Cloud Functions.

How to Fetch Data and Perform Data Mutations with the Riverpod Architecture

How to Fetch Data and Perform Data Mutations with the Riverpod Architecture

#dart
#flutter
#riverpod
#app-architecture
#design-patterns

When building mobile apps, we often need to fetch and mutate data. This article explains how to do it effectively using my reference Riverpod architecture.

Flutter App Architecture: The Presentation Layer

Flutter App Architecture: The Presentation Layer

#dart
#flutter
#state-management
#app-architecture
#riverpod

How to implement controller classes that can hold business logic, manage widget state, and interact with repositories in the data layer.

How to Secure API Keys with 2nd-Gen Cloud Functions and Firebase

How to Secure API Keys with 2nd-Gen Cloud Functions and Firebase

#firebase
#cloud-functions
#security

A step-by-step guide showing how to store API keys with the Google Secrets Manager, and access them securely inside 2nd-Gen Cloud Functions.

A Comparison of Popular Flutter App Architectures

A Comparison of Popular Flutter App Architectures

#dart
#flutter
#riverpod
#app-architecture
#design-patterns

Comparing my Riverpod App Architecture with other popular ones such as MVC, MVVM, Bloc, Stacked, Clean Architecture, and Android App Architecture.

Flutter App Architecture with Riverpod: An Introduction

Flutter App Architecture with Riverpod: An Introduction

#dart
#flutter
#riverpod
#app-architecture
#design-patterns

Introducing a new Riverpod App Architecture that can be used to build scalable and maintainable apps with a clear structure.

Flutter Navigation with GoRouter: Go vs Push

Flutter Navigation with GoRouter: Go vs Push

#dart
#flutter
#navigation

An in-depth explanation of the difference between Go and Push when using GoRouter for declarative routing.

How to Parse JSON in Dart/Flutter: The Ultimate Guide

How to Parse JSON in Dart/Flutter: The Ultimate Guide

#dart
#flutter
#networking
#json

Learn how to parse JSON and define type-safe model classes that can handle validation, nullable/optional values, and complex/nested JSON data (updated to Dart 3).

Flutter Bottom Navigation Bar with Stateful Nested Routes using GoRouter

Flutter Bottom Navigation Bar with Stateful Nested Routes using GoRouter

#dart
#flutter
#navigation
#gorouter

How to implement bottom and side navigation with stateful nested routes in Flutter using the GoRouter package (example app with source code included).

Flutter Exception Handling with try/catch and the Result type

Flutter Exception Handling with try/catch and the Result type

#dart
#flutter
#error-handling

How to use sealed classes to create a Result type that makes it explicit when a function can return an error, rather than throwing an exception.

Flutter & Firebase Auth on macOS: Resolving Common Issues

Flutter & Firebase Auth on macOS: Resolving Common Issues

#dart
#flutter
#firebase

Getting a Flutter & Firebase app to work on macOS is a tricky endeavour. Follow this step-by-step guide to get it working.

What’s New in Dart 3: Introduction

What’s New in Dart 3: Introduction

#dart
#flutter

An overview of the major features introduced in Dart 3, including: records, patterns, switch expressions, sealed classes, and class modifiers.

How to use Abstraction and the Repository Pattern Effectively in your Flutter apps

How to use Abstraction and the Repository Pattern Effectively in your Flutter apps

#dart
#flutter
#app-architecture
#firebase
#firestore

An in-depth overview of what abstractions to use to write backend-agnostic code that is more testable and maintainable, along with their tradeoffs.

How to Store API Keys in Flutter: --dart-define vs .env files

How to Store API Keys in Flutter: --dart-define vs .env files

#dart
#flutter
#security
#networking

An overview of different techniques for storing API keys on the client, along with security best practices to prevent them from being stolen.

Firestore Pagination Made Easy with FirestoreListView in Flutter

Firestore Pagination Made Easy with FirestoreListView in Flutter

#dart
#flutter
#firebase
#firestore

A simple guide showing how to use the FirestoreListView widget to enable pagination when loading large collections of documents from Firestore.

How to write Flutter apps faster with Riverpod Lint & Riverpod Snippets

How to write Flutter apps faster with Riverpod Lint & Riverpod Snippets

#dart
#flutter
#state-management
#riverpod

The new Riverpod Lint package adds useful lints and refactoring options that make writing Flutter apps a breeze. Here's how to make the most of it.

How to use Notifier and AsyncNotifier with the new Flutter Riverpod Generator

How to use Notifier and AsyncNotifier with the new Flutter Riverpod Generator

#dart
#flutter
#state-management
#riverpod

A step-by-step guide showing how to migrate StateProvider and StateNotifier to the new Notifier and AsyncNotifier classes (StreamNotifier is covered too).

How to Auto-Generate your Providers with Flutter Riverpod Generator

How to Auto-Generate your Providers with Flutter Riverpod Generator

#dart
#flutter
#state-management
#riverpod

Thanks to the new Riverpod Generator package, we no longer have to declare providers manually. This guide explains how to use the new @riverpod syntax.

How to Check if an AsyncNotifier is Mounted with Riverpod

How to Check if an AsyncNotifier is Mounted with Riverpod

#dart
#flutter
#riverpod

AsyncNotifier does not have a mounted property and this can cause some problems in practice. This article explores some solutions and their tradeoffs.

How to Navigate Without Context with GoRouter and Riverpod in Flutter

How to Navigate Without Context with GoRouter and Riverpod in Flutter

#dart
#flutter
#gorouter
#navigation
#riverpod

Let's explore some techniques to separate our business logic and navigation code from the UI, using GoRouter and Riverpod.

Dart & Flutter with ChatGPT: Is it worth it?

Dart & Flutter with ChatGPT: Is it worth it?

#dart
#flutter
#firebase
#ai

I asked ChatGPT to explain some code and write several programs in Dart & Flutter. Here's a full report with my findings, and some tips to make the most of it.

Riverpod Data Caching and Providers Lifecycle: Full Guide

Riverpod Data Caching and Providers Lifecycle: Full Guide

#dart
#flutter
#state-management
#riverpod

Riverpod is a powerful reactive caching and data-binding framework. Let’s learn how to make the most of it so we can use it effectively.

How to Unit Test AsyncNotifier Subclasses with Riverpod 2.0 in Flutter

How to Unit Test AsyncNotifier Subclasses with Riverpod 2.0 in Flutter

#dart
#flutter
#state-management
#riverpod
#testing

AsyncNotifier is great. But how do we write unit tests for it? Here are all the details and a template you can follow to test your AsyncNotifier subclasses.

Flutter Riverpod 2.0: The Ultimate Guide

Flutter Riverpod 2.0: The Ultimate Guide

#dart
#flutter
#state-management
#riverpod

A complete guide to the Riverpod package as a reactive caching and data-binding framework. Fully updated to Riverpod 2.0.

How to Read Localized Strings Outside the Widgets using Riverpod

How to Read Localized Strings Outside the Widgets using Riverpod

#dart
#flutter
#localization
#riverpod

How to access localized strings outside your widgets without a BuildContext, by creating a locale-aware AppLocalizations provider using Riverpod.

Functional Error Handling with Either and fpdart in Flutter: An Introduction

Functional Error Handling with Either and fpdart in Flutter: An Introduction

#dart
#flutter
#error-handling

Fpdart aims to bring all the main types found in functional languages to Dart. Here we focus on the Either type and learn how to use it for robust error handling.

Flutter Riverpod: How to Register a Listener during App Startup

Flutter Riverpod: How to Register a Listener during App Startup

#dart
#flutter
#riverpod
#state-management

An overview of how we can use Riverpod to register listeners and initialize complex objects with dependencies during app startup.

Singletons in Flutter: How to Avoid Them and What to do Instead

Singletons in Flutter: How to Avoid Them and What to do Instead

#dart
#flutter
#app-architecture
#design-patterns

An introduction to singletons in Flutter: what problems they solve, what other ones they introduce, and what are their alternatives.

Flutter App Architecture: The Application Layer

Flutter App Architecture: The Application Layer

#dart
#flutter
#state-management
#app-architecture
#riverpod

Service classes are the ideal place to store logic that depends on multiple data sources or repositories. Let's explore them by building a shopping cart feature.

The Beginner's Guide to Asking Coding Questions Online

The Beginner's Guide to Asking Coding Questions Online

#dart
#flutter

Asking questions and receiving answers is a two-way street. Here's what to do when you need to ask a technical coding question.

How to Write Tests using Stream Matchers and Predicates in Flutter

How to Write Tests using Stream Matchers and Predicates in Flutter

#dart
#flutter
#testing

The Flutter testing APIs offer some powerful stream matchers and predicates that we can use to verify state changes over time. Let's see how to use them in practice.

How to Generate and Analyze a Flutter Test Coverage Report in VSCode

How to Generate and Analyze a Flutter Test Coverage Report in VSCode

#dart
#flutter
#testing

How to use the flutter tool generate a test coverage report for your app or package, and improve your testing workflow with two helpful VSCode extensions.

Flutter Project Structure: Feature-first or Layer-first?

Flutter Project Structure: Feature-first or Layer-first?

#dart
#flutter
#app-architecture

An overview of the feature-first and layer-first approaches when choosing a project structure for medium/large Flutter apps, along with their tradeoffs and common pitfalls.

Flutter Riverpod Tip: Use AsyncValue rather than FutureBuilder or StreamBuilder

Flutter Riverpod Tip: Use AsyncValue rather than FutureBuilder or StreamBuilder

#dart
#flutter
#riverpod
#state-management

The AsyncValue class from the Riverpod package offers a much nicer API compared to AsyncSnapshot from the FutureBuilder and StreamBuilder widgets. Here's how to use it.

VSCode Shortcuts, Extensions & Settings for Flutter Development

VSCode Shortcuts, Extensions & Settings for Flutter Development

#dart
#flutter
#vscode
#productivity

A curated list of popular VSCode shortcuts, extensions & settings to speed-up your Flutter development workflow and code like a pro.

Flutter App Architecture: The Domain Model

Flutter App Architecture: The Domain Model

#dart
#flutter
#app-architecture

An introduction to the domain model and its role in defining entities and the business logic for manipulating them in the context of Flutter app architecture.

Simplified Flutter Localization using a BuildContext extension

Simplified Flutter Localization using a BuildContext extension

#dart
#flutter
#localization

How to simplify the Flutter skeleton app template to more easily access localized strings inside our widgets.

Flutter Flavors Setup with multiple Firebase Environments using FlutterFire and Very Good CLI

Flutter Flavors Setup with multiple Firebase Environments using FlutterFire and Very Good CLI

#dart
#flutter
#firebase

How to create Flutter & Firebase apps with multiple flavors using the FlutterFire and Very Good CLI command line tools.

How to add Firebase to a Flutter app with FlutterFire CLI

How to add Firebase to a Flutter app with FlutterFire CLI

#dart
#flutter
#firebase

How to configure simple Flutter & Firebase apps using the FlutterFire from the command line.

Flutter App Architecture: The Repository Pattern

Flutter App Architecture: The Repository Pattern

#dart
#flutter
#app-architecture
#design-patterns

An in-depth overview of the repository pattern in Flutter: what it is, when to use it, and various implementation strategies along with their tradeoffs.

How to handle loading and error states with StateNotifier & AsyncValue in Flutter

How to handle loading and error states with StateNotifier & AsyncValue in Flutter

#dart
#flutter
#state-management
#riverpod

When performing asynchronous work, we need to account for loading and error states in our UI. This article presents simple and reusable approach to handle this across multiple screens.

How to Parse Large JSON Data with Isolates in Dart 2.15

How to Parse Large JSON Data with Isolates in Dart 2.15

#dart
#flutter
#json
#networking

How to parse large JSON data using compute, Isolate.spawn, and Isolate.exit - a new feature for fast concurrency with worker isolates in Dart 2.15.

Responsive layouts in Flutter: Split View and Drawer Navigation

Responsive layouts in Flutter: Split View and Drawer Navigation

#dart
#flutter
#layouts
#state-management
#riverpod

How to implement a responsive layout in Flutter by using a split view on large screens and drawer navigation on mobile.

How to create a Flutter GridView with content-sized items

How to create a Flutter GridView with content-sized items

#dart
#flutter
#layouts

GridView is only suitable for items with a fixed aspect ratio. Here's how to use the flutter_layout_grid package to render responsive layouts with variable item sizes.

Flutter Tutorial: How to use the Firebase Local Emulator with Cloud Functions

Flutter Tutorial: How to use the Firebase Local Emulator with Cloud Functions

#dart
#flutter
#firebase
#cloud-functions

Let's build a simple mood tracking app and learn how to work with Firestore, Cloud Functions, and the Firebase Local Emulator.

Firebase Cloud Functions: Introduction and Project Setup

Firebase Cloud Functions: Introduction and Project Setup

#firebase
#cloud-functions

Learn how to setup your first project using Cloud Functions for Firebase. Includes additional resources about Node.js and the Firebase CLI.

Flutter TabBar Tutorial: How to Navigate Programmatically Between Tabs

Flutter TabBar Tutorial: How to Navigate Programmatically Between Tabs

#dart
#flutter
#navigation

Learn how to use the Flutter TabBar widget to take the user through a sequence of pages, and disable user interaction on the tabs themselves.

Flutter TextField Validation: How to work with TextEditingController, Form, and TextFormField

Flutter TextField Validation: How to work with TextEditingController, Form, and TextFormField

#dart
#flutter
#input-validation

A tutorial about text input validation, showing how to work with TextField, TextEditingController, Form, TextFormField as well as their tradeoffs.

AsyncValueWidget: a reusable Flutter widget to work with AsyncValue (using Riverpod)

AsyncValueWidget: a reusable Flutter widget to work with AsyncValue (using Riverpod)

#dart
#flutter
#state-management
#riverpod

How to create a reusable widget class that helps us when working with asynchronous data from Riverpod providers.

How to build a Chat Messaging UI in Flutter

How to build a Chat Messaging UI in Flutter

#dart
#flutter
#layouts

A simple and elegant approach to build a Chat Messaging UI with DecoratedBox, Align, and Padding widgets in Flutter.

Flutter: Animated Task Completion Ring with AnimationController and AnimatedBuilder

Flutter: Animated Task Completion Ring with AnimationController and AnimatedBuilder

#dart
#flutter
#animations

How to animate a custom task completion ring using AnimationController and AnimatedBuilder in Flutter.

Flutter: How to Draw a Task Completion Ring with CustomPainter

Flutter: How to Draw a Task Completion Ring with CustomPainter

#dart
#flutter
#animations

CustomPainter is often the way to go when we need to draw some custom shapes in Flutter. Let's see how to use it in practice.

Migrating a Flutter & Firebase app to Null Safety: A Case Study

Migrating a Flutter & Firebase app to Null Safety: A Case Study

#dart
#flutter
#null-safety

Migrating Flutter apps to Null Safety can be a challenging process. Here I show how to make this as painless as possible, using a non-trivial app as an example.

Flutter Timer vs Ticker: A Case Study

Flutter Timer vs Ticker: A Case Study

#dart
#flutter
#animations

Need a Flutter widget that updates every frame? Here's why using Timer is not a good choice, and why Ticker is a much better solution.

How to Parse JSON in Dart/Flutter with Code Generation using Freezed

How to Parse JSON in Dart/Flutter with Code Generation using Freezed

#dart
#flutter
#json
#code-generation
#freezed

Tired of writing JSON parsing code by hand? Here's how to automate this with code generation and the Freezed package.

Side Effects in Flutter: What they are and how to avoid them

Side Effects in Flutter: What they are and how to avoid them

#dart
#flutter
#state-management

Mutating state or calling async code inside the build method can cause unwanted widget rebuilds and unintended behaviour. Here are some examples and rules to follow.

How to implement a shake text effect in Flutter

How to implement a shake text effect in Flutter

#dart
#flutter
#animations

How to create a custom animation curve and implement a shake effect that can be applied to any widget in Flutter.

Flutter: Why do TweenAnimationBuilder and AnimatedBuilder have a child argument?

Flutter: Why do TweenAnimationBuilder and AnimatedBuilder have a child argument?

#dart
#flutter
#animations

Why and when to use the child widget argument to optimize Flutter performance when working with TweenAnimationBuilder and AnimatedBuilder.

HSL Colors Explained: What they are and when to use them in Dart/Flutter

HSL Colors Explained: What they are and when to use them in Dart/Flutter

#dart
#flutter

Going from RGB to HSL: How to more easily reason about colors as hue, saturation and lightness, and how to use HSL in Flutter.

Flutter vs React Native - Which is the Best Choice for Your Next App?

Flutter vs React Native - Which is the Best Choice for Your Next App?

#flutter
#react-native
#dart

Should you choose Flutter or React Native for your next app? This article offers an in-depth overview of the two frameworks, along with their pros and cons.

Flutter Bottom Navigation Bar with Multiple Navigators: A Case Study

Flutter Bottom Navigation Bar with Multiple Navigators: A Case Study

#flutter
#dart
#navigation

A guide to implementing multiple independent navigation stacks with BottomNavigationBar in Flutter.

'keytool' is not recognized as an internal or external command: How to fix this on Windows and macOS

'keytool' is not recognized as an internal or external command: How to fix this on Windows and macOS

#android
#flutter

This step-by-step guide shows how to install keytool and add it to your system PATH on Windows and macOS.

Yay! Implicit Downcasts are no longer allowed in Dart 2.9

Yay! Implicit Downcasts are no longer allowed in Dart 2.9

#dart

What implicit downcasts are, why they make your code unsafe, and how to avoid them.

Case Study: Automating UI/Integration Tests with Flutter Driver and Codemagic

Case Study: Automating UI/Integration Tests with Flutter Driver and Codemagic

#flutter
#dart
#testing
#CI

Let's see how to write integration tests with Flutter Driver, how they differ from widget tests, and how to run them with Codemagic.

Flutter: Designing an Authentication API with Service Classes

Flutter: Designing an Authentication API with Service Classes

#flutter
#dart
#firebase
#authentication

Let's see how use service classes to encapsulate 3rd party libraries and APIs, and decouple them from the rest of the application. We will use authentication as a concrete example of this.

Flutter: Global Access vs Scoped Access with Provider

Flutter: Global Access vs Scoped Access with Provider

#flutter
#dart
#dependency-injection
#provider
#firebase
#authentication
#scoped-access

This article shows how to use scoped access with Provider when using service classes in our Flutter apps.

Super Simple Authentication Flow with Flutter & Firebase

Super Simple Authentication Flow with Flutter & Firebase

#flutter
#dart
#firebase
#authentication

In this article we implement a simple authentication flow in Flutter, in less than 100 lines of code.

Widget-Async-Bloc-Service: A Practical Architecture for Flutter Apps

Widget-Async-Bloc-Service: A Practical Architecture for Flutter Apps

#flutter
#dart
#bloc
#state-management

This article introduces a new architectural pattern that I often use in my Flutter Apps. It is inspired by BLoCs and RxVMS.

Dart vs Swift: a comparison

Dart vs Swift: a comparison

#flutter
#dart
#swift
#ios

Detailed side-by-side comparison of language features between Dart 2.1 and Swift 4.2.

Flutter will change everything: A Follow Up

Flutter will change everything: A Follow Up

#flutter
#dart
#swift
#ios

Clarifications and apologies following my previous article.

Flutter will change everything, and is an excellent choice for iOS development

Flutter will change everything, and is an excellent choice for iOS development

#flutter
#dart
#swift
#ios

Controversial article with some history and a detailed comparison between Flutter and native iOS development. Includes an example showing how to build a contact list in Flutter and iOS.

My Favourite List of Flutter Resources

My Favourite List of Flutter Resources

#flutter
#dart

Flutter is awesome! Big thanks to the Flutter team and all the people in the wider community that keep pushing this project to new heights and sharing new learning material.

Flutter: The power of small and reusable widgets

Flutter: The power of small and reusable widgets

#flutter
#dart
#layouts
#refactoring

Let's learn about color gradients, composition, writing reusable UI code, and CupertinoSegmentedControl.

Flutter: Building a Flight CO2 Calculator (Part 1)

Flutter: Building a Flight CO2 Calculator (Part 1)

#flutter
#dart

Let's see how to load a CSV file into strongly-typed model classes, that can be used to calculate CO2 emissions for flights between two airports.

Flutter: Adding Animated Overlays to Your App

Flutter: Adding Animated Overlays to Your App

#flutter
#dart
#navigation
#layouts

Let's see how to use some custom code to add animated overlays and reveal action options from a FAB.

Flutter: BottomAppBar Navigation with FAB

Flutter: BottomAppBar Navigation with FAB

#flutter
#dart
#navigation
#layouts

How to dock a floating action button in the middle of a BottomAppBar.

IntelliJ / Android Studio Shortcuts for Flutter Development

IntelliJ / Android Studio Shortcuts for Flutter Development

#flutter
#dart
#productivity

List of the most useful IntelliJ/Android Studio shortcuts for better productivity.

Intro to Platform Channels: Building an Image Picker in Flutter

Intro to Platform Channels: Building an Image Picker in Flutter

#flutter
#dart
#platform-channels
#ios
#swift

Let's see how to use platform channels by building an image picker on iOS, and using it from the Dart code.

Take your Flutter tests to the next level with abstract classes and dependency injection

Take your Flutter tests to the next level with abstract classes and dependency injection

#flutter
#dart
#testing

This article shows how to write testable code in Flutter, and take your widget tests to the next level.

How fast is Flutter? I built a stopwatch app to find out

How fast is Flutter? I built a stopwatch app to find out

#flutter
#dart
#performance

In-depth performance comparison for a stopwatch app built in native iOS vs Flutter.

All Tutorials

Articles

Browse all 89 articles

Videos

Browse all 34 videos

Tips

Browse all 27 tips