provider icon indicating copy to clipboard operation
provider copied to clipboard

Improve Selector documentation

Open subzero911 opened this issue 3 years ago • 0 comments

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

subzero911 avatar Dec 22 '21 07:12 subzero911