PaintEditorConfigs constructor

const PaintEditorConfigs({
  1. bool enabled = true,
  2. bool hasOptionFreeStyle = true,
  3. bool hasOptionArrow = true,
  4. bool hasOptionLine = true,
  5. bool hasOptionRect = true,
  6. bool hasOptionCircle = true,
  7. bool hasOptionDashLine = true,
  8. bool hasOptionEraser = true,
  9. bool canToggleFill = true,
  10. bool canChangeLineWidth = true,
  11. bool initialFill = false,
  12. bool showColorPicker = true,
  13. bool? freeStyleHighPerformanceScaling,
  14. bool? freeStyleHighPerformanceMoving,
  15. bool freeStyleHighPerformanceHero = false,
  16. double initialStrokeWidth = 10.0,
  17. Color initialColor = const Color(0xffff0000),
  18. 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.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.showColorPicker = true,
  this.freeStyleHighPerformanceScaling,
  this.freeStyleHighPerformanceMoving,
  this.freeStyleHighPerformanceHero = false,
  this.initialStrokeWidth = 10.0,
  this.initialColor = const Color(0xffff0000),
  this.initialPaintMode = PaintModeE.freeStyle,
}) : assert(initialStrokeWidth > 0, 'initialStrokeWidth must be positive');