setHeader method
Sets an HTTP header for subsequent requests.
Creates a shallow copy of headers to avoid mutating shared state. Returns this for method chaining.
storage.from('bucket').setHeader('x-custom-header', 'value').upload(...);
Implementation
StorageFileApi setHeader(String key, String value) {
_headers = {..._headers, key: value};
return this;
}