newHeaders method

  1. @override
Future<Map<String, String>> newHeaders(
  1. Map<String, String>? headers
)
override

Adds security/authorizaton headers to all http requests made with this client

Implementation

@override
Future<Map<String, String>> newHeaders(Map<String, String>? headers) async {
  headers ??= <String, String>{};
  headers.addAll(
      await _googleSignIn.currentUser?.authHeaders ?? <String, String>{});
  return headers;
}