colorRecognition method
Implementation
Future<ColorRecognition?> colorRecognition(String fileId,
{int numberOfColors = 4}) async {
var path = CdnPathBuilder(fileId)
.preview()
.colorRecognition(numberOfColors: numberOfColors)
.build();
var response = await _client.get(Uri.parse('$baseUrl$path'));
if (!response.isSuccessful) {
print('error : ${response.statusCode}');
return null;
}
return ColorRecognition.fromJson(jsonDecode(response.body));
}