createVote method
Implementation
@override
Future<CreateVote> createVote({required String distinctId, required String targetId, required String category, bool? toggle}) async {
final response = await dio.post(
'/votes',
data: {
'api_key': Environment.apiKey,
'campaign': Environment.campaign,
'distinct_id': distinctId,
'target_id': targetId,
'category': category,
'toggle': toggle,
}
);
final Map<String, dynamic> responseData = _parseResponse(response.data);
return _jsonToCreateVote(responseData);
}