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

783 Views Asked by At

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" ?

1

There are 1 best solutions below

1
omar hatem On BEST ANSWER
EitherValue.getOrElse(() => ""); // the function should return the same type of Right hand side