CropOptions.fromMap constructor

CropOptions.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory CropOptions.fromMap(Map<String, dynamic> map) {
  return CropOptions(
    cropRect: map['cropRect'] != null ? CropRect.fromMap(map['cropRect']) : null,
    enableCrop: map['enableCrop'] ?? false,
    aspectRatio: map['aspectRatio']?.toDouble(),
    freeform: map['freeform'] ?? true,
    showGrid: map['showGrid'] ?? true,
    lockAspectRatio: map['lockAspectRatio'] ?? false,
  );
}