I am reading some Json files from my firebase database and I am trying to obtain an ID token for the current user to be used in the header as follows:
var respo
getIdToken() returns a Future - you have to await it to actually get the token string:
Future
await
var token = await FirebaseAuth.instance.currentUser().getIdToken(); var response = await httpClient.get(url,headers: {'Authorization':"Bearer $token"});