getAccount method
Implementation
@override
Future<Response<Account>> getAccount({String? authToken}) async {
final response = await http.get(
Uri.https('ean-db.com', 'api/v2/account'),
headers: {
'Authorization':
'Bearer ${authToken ?? String.fromEnvironment('EAN_DB_API_KEY')}',
'accept': 'application/json',
},
);
return ResponseDto<AccountDto>.fromJson(
response.body,
).toResponse<Account>();
}