Skip to content

[Riverpod] Async, future, watch in build provider function. Best practice #3509

Answered by snapsl
Mir1001 asked this question in Q&A
Discussion options

You must be logged in to vote

Using .future is the correct approach here! :)
state = AsyncValue.loading(); is not required as AsyncValue is already set to loading during the first build.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mir1001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants