PaintEditorConfigs constructor

const PaintEditorConfigs({
  1. bool enabled = true,
  2. bool editorIsZoomable = false,
  3. double editorMinScale = 1.0,
  4. double editorMaxScale = 5.0,
  5. bool hasOptionFreeStyle = true,
  6. bool hasOptionArrow = true,
  7. bool hasOptionLine = true,
  8. bool hasOptionRect = true,
  9. bool hasOptionCircle = true,
  10. bool hasOptionDashLine = true,
  11. bool hasOptionEraser = true,
  12. bool canToggleFill = true,
  13. bool canChangeLineWidth = true,
  14. bool initialFill = false,
  15. double minScale = double.negativeInfinity,
  16. double maxScale = double.infinity,
  17. bool? freeStyleHighPerformanceScaling,
  18. bool? freeStyleHighPerformanceMoving,
  19. bool freeStyleHighPerformanceHero = false,
  20. 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.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');