getProductsByChannelId method
Gets all the products of the channel that matches an id.
Implementation
Future<List<Product>> getProductsByChannelId(int id) async {
final response = await _context.client.get(
Uri.https(authority, '$path/channels/$id/products'),
);
ClientException.checkIsSuccessStatusCode(response);
return (json.decode(response.body) as List)
.map((e) => Product.fromJson(e))
.toList();
}