Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Selector2?

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
},
like image 859
Arrizal Shidiq Avatar asked Oct 28 '25 05:10

Arrizal Shidiq


1 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

like image 171
Arrizal Shidiq Avatar answered Oct 30 '25 21:10

Arrizal Shidiq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!