maybeWhen<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult maybeWhen<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
    )?,
  5. required TResult orElse(
      )}
    )
    @optionalTypeArgs, inherited

    Implementation

    @optionalTypeArgs
    TResult maybeWhen<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,
      required TResult orElse(),
    }) =>
        throw _privateConstructorUsedError;