DrawObjectAdapter<T extends DrawObject> class
abstract
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
panScaleEnabled
→ bool
-
Whether the canvas should pan and scale in response to touch events.
no setter
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectEnabled
→ bool
-
Whether the canvas should attempt to select objects in response to
touch events.
no setter
-
typeId
→ String
-
The unique identifier of this.
no setter
Methods
-
cancelSelect(T object)
→ void
-
The object is no longer being selected. It should no longer render its
hitbox and interactive handles.
-
end(T object, Color color, Size size)
→ bool
-
Returning
true
will keep the object, false
will discard it.
-
fromJSON(Map encoded)
→ T
-
Creates an instance of DrawObject from a JSON object.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
querySelect(T object, Offset focalPoint, Matrix4 transform, Size size)
→ bool
-
Returning
true
will select the object.
-
select(T object)
→ void
-
The object has been chosen as the selected object. It should render its
hitbox and interactive handles, if any.
-
selectedEnd(T object)
→ bool
-
Returning
false
will cancel the selection of the object.
-
selectedStart(T object, Offset focalPoint, Matrix4 transform, Size size)
→ bool
-
Returning
false
will cancel the selection of the object, in which case
selectedUpdate() and selectedEnd() will not be called for the
same interaction.
-
selectedUpdate(T object, Offset focalPoint, Matrix4 transform, Size size)
→ bool
-
Returning
true
will trigger a re-paint.
-
selectUpdateColor(T object, Color color)
→ void
-
Triggered by a change in
color
when an object is selected.
-
start(BuildContext context, Offset focalPoint, Color color, Matrix4 transform, Size size)
→ FutureOr<T?>
-
Returning
null
will discard the object.
-
toString()
→ String
-
A string representation of this object.
inherited
-
update(T object, Offset focalPoint, Color color, Matrix4 transform, Size size)
→ bool
-
Returning
true
will trigger a re-paint.