whenIs<T> method

PatternMatcher<I, O> whenIs<T>(
  1. Type type,
  2. O function(
    1. T input
    )
)

Implementation

PatternMatcher<I, O> whenIs<T>(Type type, O Function(T input) function) =>
    when(TransformingPredicate<I, T>((i) => i?.runtimeType == type, identity),
        function);