whenIs<T> method

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

Implementation

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