maybeWhen<TResult extends Object?> method Null safety

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

    Implementation

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