when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. {required 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. required TResult formSubmit(
    1. String url,
    2. Map<String, String> headers,
    3. bool validate
    )}
)
@optionalTypeArgs, inherited

Implementation

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