when<TResult extends Object?> method Null safety

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

Implementation

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