listVotes method
Implementation
Future<List<Vote>> listVotes({
required String voter,
String? author,
String? permlink,
int? limit,
}) async {
final bodyJson = await _fetchPostData(
method: 'database_api.list_votes',
params: <String, dynamic>{
'start': [voter, author ?? '', permlink ?? ''],
'limit': limit,
'order': 'by_voter_comment'
},
);
final result = bodyJson['result'] as Map<String, dynamic>;
final votes = result['votes'] as List<dynamic>;
return [
for (final vote in votes) Vote.fromJson(vote as Map<String, dynamic>)
];
}