Slide 5
Slide 5 text
What is (Riverpod’s)Provider?
● An object that encapsulates a state and allows listening to the
changes.
● Allows easily accessing to a state from multiple locations.
● A replacement of patterns like Singletons, Service Locators,
Dependency Injection, or InheritedWidgets.
@riverpod
String helloWorld(HelloWorldRef ref) {
return 'Hello world';
}