Skip to content

How to use a provider inside a custom hook? #913

Answered by rrousselGit
yom-ko asked this question in Q&A
Discussion options

You must be logged in to vote

You could pass a WidgetRef obtained from a ConsumerWidget/Consumer as a parameter to your custom hook, or straight up pass the resolved value.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yom-ko
Comment options

@rrousselGit
Comment options

Answer selected by yom-ko
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