PaintEditorConfigs class

Configuration options for a paint editor.

PaintEditorConfigs allows you to define settings for a paint editor, including whether the editor is enabled, which drawing tools are available, initial settings for drawing, and more.

Example usage:

PaintEditorConfigs(
  enabled: true,
  hasOptionFreeStyle: true,
  hasOptionArrow: true,
  hasOptionLine: true,
  hasOptionRect: true,
  hasOptionCircle: true,
  hasOptionDashLine: true,
  canToggleFill: true,
  canChangeLineWidth: true,
  initialFill: false,
  showColorPicker: true,
  initialStrokeWidth: 10.0,
  initialColor: const Color(0xffff0000),
  initialPaintMode: PaintModeE.freeStyle,
);

Constructors

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 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.
const

Properties

canChangeLineWidth bool
Indicating whether the line width can be changed.
final
canToggleFill bool
Indicating whether the fill option can be toggled.
final
editorIsZoomable bool
Indicates whether the editor supports zoom functionality.
final
editorMaxScale double
The maximum scale factor for the editor.
final
editorMinScale double
The minimum scale factor for the editor.
final
enabled bool
Indicates whether the paint editor is enabled.
final
freeStyleHighPerformanceHero bool
Enables high-performance hero-animations for free-style drawing when set to true.
final
freeStyleHighPerformanceMoving bool?
Enables high-performance moving for free-style drawing when set to true.
final
freeStyleHighPerformanceScaling bool?
Enables high-performance scaling for free-style drawing when set to true.
final
hashCode int
The hash code for this object.
no setterinherited
hasOptionArrow bool
Indicating whether the arrow drawing option is available.
final
hasOptionCircle bool
Indicating whether the circle drawing option is available.
final
hasOptionDashLine bool
Indicating whether the dash line drawing option is available.
final
hasOptionEraser bool
Indicating whether the eraser option is available.
final
hasOptionFreeStyle bool
Indicating whether the free-style drawing option is available.
final
hasOptionLine bool
Indicating whether the line drawing option is available.
final
hasOptionRect bool
Indicating whether the rectangle drawing option is available.
final
initialFill bool
Indicates the initial fill state.
final
initialPaintMode PaintModeE
Indicates the initial paint mode.
final
maxScale double
The maximum scale factor from the layer.
final
minScale double
The minimum scale factor from the layer.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited