match<T> method
T
match<T>(
- T onFalse(),
- T onTrue()
Pattern matching on bool. Execute onFalse
when the value is false
,
otherwise execute onTrue
.
Same as fold
.
Implementation
T match<T>(T Function() onFalse, T Function() onTrue) =>
this ? onTrue() : onFalse();