uploadGoogleHealthConnectArrayDataWithToken method
Implementation
Future<bool> uploadGoogleHealthConnectArrayDataWithToken(
String token,
List<Map<String, String>> data,
) async {
try {
final payload = {'data': data, 'version': 2, 'externalUserId': 'NA'};
final _ = await dio.post(
'${Config.url}/custom-data/google-health/upload-with-token',
data: payload,
options: Options(
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer $token',
},
),
);
return true;
} catch (e) {
return false;
}
}