Riverpod Tutorial 03 - FutureProvider, AsyncValue and Error Handling

  Рет қаралды 13,188

Fun with Flutter

Fun with Flutter

Күн бұрын

A must watch for Riverpod users. Pro tips on using AsyncValue with StateNotifier to improve your code's readability and safety. The video starts with a primer on FutureProvider and AsyncValue, and then goes into detail on how to use AsyncValue with a StateNotifier and proper error handling.
--
Riverpod Tutorials and code:
github.com/funwithflutter/riv...
--
Check out my Flutter Animation and Performance course.
Discounted link: bit.ly/funwithcourse
Or use the promo code: FUN
for a discount at checkout: courses.funwith.app
--
Join me on the socials.
Twitter: / gordonphayes
---
Chapters:
0:00 Intro
0:40 AsyncValue and FutureProvider Primer
7:37 Code Overview
9:55 Overrides for Mock Classes
11:04 State Notifier with AsyncValue
16:17 Handling Exceptions
22:00 Next up

Пікірлер: 29
@suhanmukim2062
@suhanmukim2062 2 жыл бұрын
I've got a lot of help from your videos and suddenly realize I've never made comments. Thanks for your works.
@FunwithFlutter
@FunwithFlutter 2 жыл бұрын
I’m glad they’ve been helpful to you! Always great to hear
@barindersingh04
@barindersingh04 3 жыл бұрын
Amazing video thanks!! waiting for riverpod provider listener video
@iangriggs
@iangriggs 3 жыл бұрын
Great series on Riverpod. You are filling in some important gaps in real world usage with these videos. Please do the next Riverpod update with Freezed (or a dedicated video on Freezed anyhow?) or maybe Firebase auth with Riverpod StreamProvider?
@FunwithFlutter
@FunwithFlutter 3 жыл бұрын
All great ideas. Yeah I think Firebase would be a good example of using StreamProvider. I'll probably do a Freezed video and then the stream provider one.
@cptsakamoto
@cptsakamoto 3 жыл бұрын
Thanks for the video.
@shannonhall4871
@shannonhall4871 3 жыл бұрын
Fantastic content brother, I appreciate your effort.
@FunwithFlutter
@FunwithFlutter 3 жыл бұрын
You're welcome!
@user-wr9ff4wl4o
@user-wr9ff4wl4o 2 жыл бұрын
Big thanks!
@findsarfaraz
@findsarfaraz Жыл бұрын
I tried similar concept of toggle in my code. It is still refreshing and updating state of all models in the list.
@tadaspetra
@tadaspetra 3 жыл бұрын
Great video! Really great way to handle it. Quick hint, I am pretty sure at 18:59 you are unnecessarily unpacking a list into a list. [...list]..add should work the same way as list..add
@FunwithFlutter
@FunwithFlutter 3 жыл бұрын
Oo thanks for that :)
@tadaspetra
@tadaspetra 3 жыл бұрын
@@FunwithFlutter yea I think that’s right!
@officialismailshah
@officialismailshah 2 жыл бұрын
you are awesome ❤❤❤❤🙌🙌🙌🙌
@FunwithFlutter
@FunwithFlutter 2 жыл бұрын
Stahp 😊
@enafor99
@enafor99 3 жыл бұрын
Wow Aweasom tutorial ! thank you so much, if you can make another tutorial how to use ' State Notifier with AsyncValue & Handling Exceptions' to make things more clear that will be nice thnak you
@FunwithFlutter
@FunwithFlutter 3 жыл бұрын
Maybe I'll do a bigger app from scratch using Riverpod. Start to finish
@frederickmfinanga2037
@frederickmfinanga2037 3 жыл бұрын
Hey, unrelated but could you a flutter web video on how use firebase email link sign in?
@findsarfaraz
@findsarfaraz 2 жыл бұрын
Want to know if you are handling a error in function inside the state notifier and you want to update error to user or prompt user about the same. How would you do that. Will it also require the exception provider which will be updated same will handled via ref.listen in UI.
@cmo6302
@cmo6302 3 жыл бұрын
Hello, my question is make reward app with flutter is possible? or make reward app is the field(=realm) of native app(kotlin, swift)? (reward app = if user watch advertisements, they can get real cash and i get ads commission)
@TechWithDnes
@TechWithDnes 3 жыл бұрын
Wow... Nice ))
@FunwithFlutter
@FunwithFlutter 3 жыл бұрын
Thank you! Cheers!
@findsarfaraz
@findsarfaraz Жыл бұрын
Sir, when you are using AsyncValue in statenotifier when you toggle completed using the function. Will it rebuild only one tile which is changed or entire list. I am facing this issue. I am not able to run your code so far.
@hasan_eke
@hasan_eke 2 жыл бұрын
read(todosExceptionProvider).state is not working
@FunwithFlutter
@FunwithFlutter 2 жыл бұрын
There has been updates, you no longer need to do .state. You get the state back automatically. But to get the notifier you will need to do read(provider.notifier);
@burakbirer5938
@burakbirer5938 3 жыл бұрын
This is quite complicated.
@FunwithFlutter
@FunwithFlutter 3 жыл бұрын
Oh no.
Riverpod Tutorial 04 - Freezed: Unions and Data Classes
42:38
Fun with Flutter
Рет қаралды 10 М.
Stop returning custom error responses from your API. Do this instead.
12:07
Amichai Mantinband
Рет қаралды 81 М.
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 48 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 25 МЛН
Riverpod 2.0 - Complete Guide (Flutter Tutorial)
1:03:37
Reso Coder
Рет қаралды 109 М.
Catch Exceptions in Flutter Like Never Before!
9:02
Rivaan Ranawat
Рет қаралды 20 М.
Riverpod Tutorial 01 - Understanding the different notifiers
20:10
Fun with Flutter
Рет қаралды 30 М.
Riverpod Simplified | Easy State Management
14:17
Tadas Petra
Рет қаралды 43 М.
Moving from setState to Riverpod in Flutter Part 1
36:00
The Flutter Factory
Рет қаралды 18 М.
Riverpod StateNotifier Explained Like a Pro
23:16
dbestech
Рет қаралды 3,8 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 172 М.
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 48 МЛН