cropsFromMap function
Converts a Map<String, Rect> into the list form used internally.
Implementation
List<CropRegion> cropsFromMap(Map<String, ui.Rect> crops) {
return crops.entries
.map((e) => CropRegion(name: e.key, rect: e.value))
.toList();
}