Tagged with #riverpod

Browse all tags
Use AsyncValue.guard rather than try/catch inside your AsyncNotifier subclasses

Use AsyncValue.guard rather than try/catch inside your AsyncNotifier subclasses

#dart
#flutter
#riverpod

If you have many AsyncNotifier subclasses, using try/catch can be tedious. With AsyncValue.guard you get the same result with less boilerplate.

Flutter Pagination with Riverpod: The Ultimate Guide

Flutter Pagination with Riverpod: The Ultimate Guide

#dart
#flutter
#riverpod
#app-architecture
#ultimate-guide

A complete guide to implementing pagination with Riverpod, covering: infinite scrolling, loading and error states, search UI, caching, and debouncing.

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.

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.

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.

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.

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.

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
#ultimate-guide

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.

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.

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.

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.

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.

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.

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.

Starter Architecture for Flutter & Firebase Apps using Riverpod

Starter Architecture for Flutter & Firebase Apps using Riverpod

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

A detailed overview of a production-ready architecture that I've fine-tuned over the last two years. You can use the included starter project as the foundation for your Flutter & Firebase apps.

Browse all tags