devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Create ValueListenablesBuilder class

Open jacob314 opened this issue 4 years ago • 1 comments

We have cases where we need to listen on multiple value listenables but creating a stateful widget wouldn't make sense. Multiple nested value listenable builders are inefficient and hard to read. Create a ValueListenablesBuilder that lets you listen on 2 or 3 value listenables with a builder callback that matches the # of value listenables passed to the constructor. Alternately, create a util that builds a ValueListenable from multiple value listenables returning a tuple with the current values.

jacob314 avatar May 06 '21 20:05 jacob314

Reopening this issue. We have DualValueListenableBuilder, which is helpful, but there are still cases where we have more than two ValueListenables we want to listen to and build on changes.

kenzieschmoll avatar Oct 04 '22 19:10 kenzieschmoll