setMaxRequestsPerHost method

Future<void> setMaxRequestsPerHost(
  1. int max
)

Sets the maximum number of concurrent HTTP requests per host that the underlying HTTP service may issue.

Lowering this value reduces the chance of hitting per-token rate limits when downloading large amounts of data (for example, offline tile regions), at the cost of slower throughput.

A max outside the range 1..255 is clamped to that range. On Android, a value above 127 acts as 127. On web, this call has no effect, because the browser controls the number of requests per host.

Implementation

Future<void> setMaxRequestsPerHost(int max) =>
    _impl.setMaxRequestsPerHost(max.clamp(1, 255));