whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. {TResult? lengthLimiting(
    1. int? maxLength,
    2. MaxLengthEnforcement? maxLengthEnforcement
    )?,
  2. TResult? filtering(
    1. String filterPattern,
    2. bool allow,
    3. String replacementString
    )?,
  3. TResult? filteringAllow(
    1. String filterPattern,
    2. String replacementString
    )?,
  4. TResult? filteringDeny(
    1. String filterPattern,
    2. String replacementString
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(
          int? maxLength, MaxLengthEnforcement? maxLengthEnforcement)?
      lengthLimiting,
  TResult? Function(
          String filterPattern, bool allow, String replacementString)?
      filtering,
  TResult? Function(String filterPattern, String replacementString)?
      filteringAllow,
  TResult? Function(String filterPattern, String replacementString)?
      filteringDeny,
}) =>
    throw _privateConstructorUsedError;