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

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. https://codewithandrea.com/articles/loading-error-states-state-notifier-freezed/

созданный 3y | 15 дек. 2021 г., 16:22:03


Войдите, чтобы добавить комментарий

Другие сообщения в этой группе

GoRouter Delegate Listener for Screen Tracking

If your app uses GoRouter with shell routes, tracking screen views reliably requires some workarounds. Here's how to make it work. https://codewithandrea.com/tips/go-router-delegate-listener/

8 мая 2025 г., 15:50:03 | Code with Andrea
Button Styles in Material 3

Material 3 supports 5 types of buttons: elevated, filled, filled tonal, outlined, and text. Here's how to use them in Flutter. https://codewithandrea.com/tips/button-styles-material3/

7 мая 2025 г., 11:50:03 | Code with Andrea
Test your UI with ThemeData.platform

By overriding ThemeData.platform inside MaterialApp, you can quickly test all your adaptive widgets and any conditional code that checks the platform. https://codewithandrea.com/tips/themedata-platfor

6 мая 2025 г., 12:40:03 | Code with Andrea
Flutter App Analytics: Scalable Architecture & Firebase Setup

A complete guide to adding analytics to Flutter apps using Firebase. Track custom events with a maintainable architecture. https://codewithandrea.com/articles/flutter-app-analytics/

2 мая 2025 г., 13:40:04 | Code with Andrea
Adaptive Alert Dialog (Material, Cupertino)

A simple alert dialog that supports adaptive mode, default and cancel actions, destructive style, and dismissible mode. https://codewithandrea.com/tips/adaptive-alert-dialog/

1 мая 2025 г., 09:50:03 | Code with Andrea
Kotlin DSL in Flutter 3.29: How to Update Your Android Gradle Files

New Kotlin DSL in Flutter 3.29? Learn how to update your Gradle files, configure code signing, flavors, and more, in minutes. https://codewithandrea.com/articles/flutter-android-gradle-kts/

30 апр. 2025 г., 15:20:05 | Code with Andrea
How to Initialize Firebase Remote Config

A battle tested solution for loading Firebase Remote Config in Flutter, avoiding common pitfalls. https://codewithandrea.com/tips/firebase-remote-config-init/

30 апр. 2025 г., 10:40:04 | Code with Andrea