headers static method
Implementation
static Map<String, String> headers(
{String? token, bool auth = false, required String lang}) {
Map<String, String> header = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'accept-language': lang,
};
if (auth) {
header['Authorization'] = 'Bearer $token';
}
return header;
}