How to use Selector2?

Viewed 1348

Is there any example of using this Selector2 in Provider package ?.I can't find any documentation on how to use this

Selector2<ModelA,ModelB, bool>(
   selector: (_, modelA,modelB) {
   return modelA.isLoading; //I don't know how to return this
},
2 Answers

I just found a workaround like this

Selector2<ModelA,ModelB,Tuple2<bool,bool>>(
  selector : (_,modelA,modelB) => Tuple2(modelA.isLoading,modelB.isLoading),
  builder : ...
)

import tuple package first before using this

I found documentation on it right here

Related