customHeadersInterceptor static method
Creates a custom header interceptor that adds headers to all requests
Implementation
static Interceptor customHeadersInterceptor(Map<String, String> headers) {
return InterceptorsWrapper(
onRequest: (options, handler) {
options.headers.addAll(headers);
handler.next(options);
},
);
}