cropsFromMap function

List<CropRegion> cropsFromMap(
  1. Map<String, Rect> crops
)

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();
}