How the Crop widget and CropController work together
mainThe crop_your_image package is built around two primary components: the Crop widget and the CropController.
Crop: A widget designed to be used anywhere (e.g., in aDialogorBottomSheet). It handles the UI for zooming and panning via aGestureDetector.CropController: An imperative controller used to manage theCropwidget, similar to howTextEditingControllerworks for aTextField. You use it to trigger actions likecrop().
To use them together, you must provide the CropController to the Crop widget. The widget will then initialize the controller and attach its internal delegates.