PaintEditorConfigs constructor
const
PaintEditorConfigs({
- bool enabled = true,
- bool editorIsZoomable = false,
- double editorMinScale = 1.0,
- double editorMaxScale = 5.0,
- bool hasOptionFreeStyle = true,
- bool hasOptionArrow = true,
- bool hasOptionLine = true,
- bool hasOptionRect = true,
- bool hasOptionCircle = true,
- bool hasOptionDashLine = true,
- bool hasOptionEraser = true,
- bool canToggleFill = true,
- bool canChangeLineWidth = true,
- bool canChangeOpacity = true,
- bool initialFill = false,
- double minScale = double.negativeInfinity,
- double maxScale = double.infinity,
- bool? freeStyleHighPerformanceScaling,
- bool? freeStyleHighPerformanceMoving,
- bool freeStyleHighPerformanceHero = false,
- PaintModeE initialPaintMode = PaintModeE.freeStyle,
Creates an instance of PaintEditorConfigs with optional settings.
By default, the editor is enabled, and most drawing tools are enabled. Other properties are set to reasonable defaults.
Implementation
const PaintEditorConfigs({
this.enabled = true,
this.editorIsZoomable = false,
this.editorMinScale = 1.0,
this.editorMaxScale = 5.0,
this.hasOptionFreeStyle = true,
this.hasOptionArrow = true,
this.hasOptionLine = true,
this.hasOptionRect = true,
this.hasOptionCircle = true,
this.hasOptionDashLine = true,
this.hasOptionEraser = true,
this.canToggleFill = true,
this.canChangeLineWidth = true,
this.canChangeOpacity = true,
this.initialFill = false,
this.minScale = double.negativeInfinity,
this.maxScale = double.infinity,
this.freeStyleHighPerformanceScaling,
this.freeStyleHighPerformanceMoving,
this.freeStyleHighPerformanceHero = false,
this.initialPaintMode = PaintModeE.freeStyle,
}) : assert(maxScale >= minScale,
'maxScale must be greater than or equal to minScale'),
assert(editorMaxScale > editorMinScale,
'editorMaxScale must be greater than editorMinScale');