selectCropTool method

void selectCropTool(
  1. EditToolsMenu tool, {
  2. double? aspectRatio,
})

选择特定的裁剪工具(带宽高比)

Implementation

void selectCropTool(EditToolsMenu tool, {double? aspectRatio}) {
  final resolvedTool = _resolveCropTool(tool);
  if (resolvedTool == null) {
    return;
  }
  _activeTool = resolvedTool;
  final targetAspectRatio = aspectRatio ?? _getAspectRatioForTool(resolvedTool);
  _initializeCropRect(aspectRatio: targetAspectRatio);
  notifyListeners();
}