setCustomHeaders method

Future<void> setCustomHeaders(
  1. Map<String, String> headers
)

Set custom headers for all Mapbox HTTP requests

headers is a map of header names to header values

Throws a PlatformException if the native implementation is not available or if the operation fails

Example:

MapboxMap.setCustomHeaders({
  "Authorization": "Bearer your_secret_token",
});

Throws a PlatformException if the native implementation is not available or if the operation fails

Implementation

Future<void> setCustomHeaders(Map<String, String> headers) =>
    httpService.setCustomHeaders(headers);