Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

How to call a method on the State Notifier Provider

/// To call a method 
context.read(providerVariable.notifier).methodToCall();

/// In our case to call the state notifier
context.read(jokesNotifierProvider.notifier).getJoke();
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #How #call #method #State #Notifier #Provider
ADD COMMENT
Topic
Name
7+2 =