How to Check if an AsyncNotifier is Mounted with Riverpod

AsyncNotifier does not have a mounted property and this can cause some problems in practice. This article explores some solutions and their tradeoffs. https://codewithandrea.com/articles/async-notifier-mounted/

Created 1y | Feb 17, 2023, 12:20:28 PM


Login to add comment

Other posts in this group

How to Run Multiple Test Variants

You can run a widget test multiple times with the variant argument. Very useful for golden image tests for different screen sizes. https://codewithandrea.com/tips/run-multiple-test-variants/

Apr 26, 2024, 4:10:04 PM | Code with Andrea
How to Use Tags in Your Unit and Widget Tests

Ever wanted to filter tests so you only run the ones you need to? This can be easily done using test tags. https://codewithandrea.com/tips/unit-widget-test-tags-flutter/

Apr 26, 2024, 4:10:03 PM | Code with Andrea
Code Generation with Dart & Flutter: The Ultimate Guide

An extensive guide covering the code generation mechanism in Dart, useful code-generating packages, and tips for efficient codebase maintenance. https://codewithandrea.com/articles/dart-flutter-code-g

Apr 26, 2024, 1:50:01 PM | Code with Andrea
Testing Functions That Throw

When writing test expectations for functions that throw, we need a bit careful. To avoid surprises, always pass a closure inside the expect method. https://codewithandrea.com/tips/testing-functions-th

Apr 25, 2024, 10:30:12 AM | Code with Andrea
April 2024: WASM I/O Updates, Theme Extensions, Signals 5.0, iOS Privacy Manifest Tools

Also included in this edition: UI Testing with Maestro, Flutter Custom Carousel, codegen with GenQ, Shorebird 1.0, and the latest from Code with Andrea. https://codewithandrea.com/newsletter/april-202

Apr 25, 2024, 10:30:12 AM | Code with Andrea
Flutter Tip: Use Composition Aggressively

Create small, reusable widgets that are easier to reason about, and banish the massive build method from existence! https://codewithandrea.com/tips/use-composition-aggressively/

Apr 23, 2024, 5:30:08 PM | Code with Andrea
Add Fixed Spacing with the Gap Widget

How to easily add fixed spacing inside Flex widgets such as Columns and Rows or scrolling views. https://codewithandrea.com/tips/gap-widget/

Apr 22, 2024, 11:50:07 AM | Code with Andrea