whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. {TResult? http(
    1. String url,
    2. Map<String, String> headers,
    3. String? method,
    4. String? bodyText,
    5. List<int>? bodyBytes,
    6. Map<String, Object>? bodyMap,
    7. bool streamedResponse
    )?,
  2. TResult? formSubmit(
    1. String url,
    2. Map<String, String> headers,
    3. bool validate
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(
          String url,
          Map<String, String> headers,
          String? method,
          String? bodyText,
          List<int>? bodyBytes,
          Map<String, Object>? bodyMap,
          bool streamedResponse)?
      http,
  TResult? Function(String url, Map<String, String> headers, bool validate)?
      formSubmit,
}) =>
    throw _privateConstructorUsedError;