applyToParams method
Apply authentication settings to header and query params.
Implementation
@override
void applyToParams(
List<QueryParam> queryParams, Map<String, String> headerParams) {
if (_accessToken is String) {
headerParams['Authorization'] = 'Bearer $_accessToken';
} else if (_accessToken is HttpBearerAuthProvider) {
headerParams['Authorization'] = 'Bearer ${_accessToken()}';
} else {
throw ArgumentError(
'Type of Bearer accessToken should be a String or a String Function().');
}
}