WindowPaintValue class

The current mode and color state for a WindowPaint widget.

Annotations

Constructors

WindowPaintValue({String mode = 'pan_zoom', Color color = const Color(0xFF000000), List<DrawObject>? objects, Color colorBeforeSelection = const Color(0x00000000), int selectedObjectIndex = -1})
Creates information for painting a widget.
WindowPaintValue.fromJSON(List<DrawObjectAdapter<DrawObject>> adapters, Map encoded)
Creates an instance of this class from a JSON object.
factory

Properties

color → Color
The color of the paint tool.
final
colorBeforeSelection → Color
The value of color before selecting an object.
final
hashCode → int
The hash code for this object.
no setteroverride
isSelecting → bool
Whether or not we're currently selecting a DrawObject.
no setter
mode → String
The current paint mode being used.
final
objects → List<DrawObject>
The objects to render.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedObjectIndex → int
The index of the currently selected object, if any.
final

Methods

copyWith({String? mode, Color? color, List<DrawObject>? objects, Color? colorBeforeSelection, int? selectedObjectIndex}) → WindowPaintValue
Creates a copy of this value but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJSON() → Map<String, dynamic>
Returns a representation of this object as a JSON object.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Properties

empty ↔ WindowPaintValue
A value that corresponds to the pan/zoom mode and black color.
getter/setter pair