takeIf method

T? takeIf(
  1. bool predicament(
    1. T it
    )
)

Implementation

T? takeIf(final bool Function(T it) predicament) =>
    predicament(this) ? this : null;