Home > OS >  How to obtain only the right hand side value from dartz?
How to obtain only the right hand side value from dartz?

Time:01-05

How to obtain only the right hand side value from dartz?

the code is

Some(EitherValue)

the output is:

Some(Right("hi")) 

How to get the value of hi without "Some(Right" ?

CodePudding user response:

EitherValue.getOrElse(() => ""); // the function should return the same type of Right hand side
  •  Tags:  
  • Related