getGoalsIndex method
Future<List<IndexGoals> >
getGoalsIndex({
- required bool enabled,
- required List<
String> tags, - num? page,
- num? limit,
- String? sponsorId,
- bool? trending,
- String? q,
override
Implementation
@override
Future<List<IndexGoals>> getGoalsIndex({
required bool enabled,
required List<String> tags,
num? page,
num? limit,
String? sponsorId,
bool? trending,
String? q,
}) async {
final response = await dio.post(
'/goals/index',
data: {
'api_key': Environment.apiKey,
'campaign': Environment.campaign,
'enabled': enabled,
'tags': tags,
'page': ?page,
'limit': ?limit,
'sponsor_id': ?sponsorId,
'trending': ?trending,
'q': ?q,
},
);
final Map<String, dynamic> responseData = jsonDecode(response.data);
return _goalsIndexFromResponse(responseData);
}