any method

void any({
  1. Object? json,
  2. List<int>? body,
  3. String? contentType,
  4. int status = 200,
  5. Map<String, String> headers = const {},
  6. Object? throws,
})

Answers everything no other stub claimed, whatever the method.

The offline test is this one:

s.network.any(throws: const SocketException('Network is unreachable'));

Implementation

void any({
  Object? json,
  List<int>? body,
  String? contentType,
  int status = 200,
  Map<String, String> headers = const {},
  Object? throws,
}) => _fallback = _Stub(
  method: null,
  url: null,
  status: status,
  body: _bodyOf(json, body),
  contentType: contentType ?? (json == null ? null : 'application/json'),
  headers: {
    for (var e in headers.entries) e.key: [e.value],
  },
  throws: throws,
);