You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to add static http headers to my API call like in the example. @headers(<String, dynamic>{
'Content-Type': 'application/json',
'Custom-Header': 'Your header',
})
But I'm getting an error 'Annotation must be either a const variable reference or const constructor invocation.'
Can someone help?
Steps to reproduce the behavior:
Add static http headers to any API call like below, @get('/api/endpoint') @headers(<String, dynamic>{
'Content-Type': 'application/json',
'Custom-Header': 'Your header',
})
Expected behavior
The headers must be added to the API request and should get success response.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to add static http headers to my API call like in the example.
@headers(<String, dynamic>{
'Content-Type': 'application/json',
'Custom-Header': 'Your header',
})
But I'm getting an error 'Annotation must be either a const variable reference or const constructor invocation.'
Can someone help?
Steps to reproduce the behavior:
Add static http headers to any API call like below,
@get('/api/endpoint')
@headers(<String, dynamic>{
'Content-Type': 'application/json',
'Custom-Header': 'Your header',
})
Expected behavior
The headers must be added to the API request and should get success response.
The text was updated successfully, but these errors were encountered: