apply method

  1. @override
Future<void> apply(
  1. RequestOptions options
)
override

Attach auth credentials to options before the request is sent.

Implementation

@override
Future<void> apply(RequestOptions options) async {
  final token = await _getToken();
  if (token != null) {
    options.headers['Authorization'] = 'Bearer $token';
  }
}