setCurrentStrokeWidth method

void setCurrentStrokeWidth(
  1. double width
)

Implementation

void setCurrentStrokeWidth(double width) {
  _currentStrokeWidth = width;
  // 如果有选中的工具,更新其线条粗细
  if (_selectedTool != null) {
    _selectedTool!.strokeWidth = width;
    onToolsChanged?.call();
  }
}