fetchComments method
- String featureRequestId
Fetches discussion comments.
Implementation
Future<List<FeatureRequestComment>> fetchComments(String featureRequestId) async {
final json = await _sendJson(
method: 'GET',
path: '/api/v1/feature-requests/$featureRequestId/comments',
);
return (json['comments'] as List<dynamic>? ?? [])
.map((c) => FeatureRequestComment.fromJson(c as Map<String, dynamic>))
.toList();
}