uploadGoogleHealthConnectData method
Implementation
Future<bool> uploadGoogleHealthConnectData(
String apiKey,
String customerId,
String externalUserId,
String data,
) async {
try {
final payload = {
'externalUserId': externalUserId,
'data': [data]
};
await dio.post(
'${Config.url}/custom-data/google-health/upload',
data: payload,
options: Options(
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
"x-api-key": apiKey,
"x-customer": customerId,
},
),
);
return true;
} catch (e) {
return false;
}
}