Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter provider difference between Consumer and context.watch

context.watch<T>() and Consumer<T> 
does the same thing. 

Most of the time context.watch<T>() is just more convenient. 
In some cases where context is not available Consumer<T> is useful.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #provider #difference
ADD COMMENT
Topic
Name
1+2 =