Callable Future Provider #1640
josh-burton
started this conversation in
Ideas
Replies: 2 comments 11 replies
-
Hello! I don't like the idea, as this is too specific. Maybe it'd help if you could explain the use-case behind this? |
Beta Was this translation helpful? Give feedback.
6 replies
-
@rrousselGit I come across this problem and more specifically with I have a future provider declare:
Now in my widget, I want to call for register after user finishes the form and click
but also, I want to render my widget according to the current state of the
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I feel like Riverpod is missing a crucial provider type - a callable future provider. i.e. a Future provider that only executes when called via a
call
orsubmit
method.This is a use case I encounter often, and currently I need to create custom StateNotifierProvider classes for each future I want to call.
Ideally we'd be able to define a provider something like this:
It would expose an AsyncValue (or variant as a extra state for 'not yet called' may be needed);
Beta Was this translation helpful? Give feedback.
All reactions