provider
provider copied to clipboard
Improve Selector documentation
https://pub.dev/documentation/provider/latest/provider/Selector-class.html
You give a complex example with tuple at once. It looks difficult for beginners. Consider adding an example for 1 value before, like this:
Here's an example:
Selector<Foo, Bar>(
selector: (_, foo) => foo.bar, // will rebuild only when `bar` changes
builder: (_, data, __) {
return Text('${data.item}');
}
)
To select multiple values without having to write a class... // Tuple example