getComments method

Future<List<Comment>> getComments(
  1. List kidIds
)

Function used to access story kids and return List<Comments>

Implementation

Future<List<Comment>> getComments(List<dynamic> kidIds) async {
  final List<http.Response> responses = await _getComments(kidIds);

  final List<Comment> stories = responses.map((response) {
    final json = jsonDecode(response.body);

    return Comment.fromJson(json);
  }).toList();

  return stories;
}