Drawing class abstract
- Inheritance
-
- Object
- ScribbleState
- Drawing
Constructors
-
Drawing({required Sketch sketch, SketchLine? activeLine, ScribblePointerMode allowedPointersMode, List<
int> activePointerIds, Point? pointerPosition, int selectedColor, double selectedWidth, double scaleFactor}) -
constfactory
-
Drawing.fromJson(Map<
String, dynamic> json) -
factory
Properties
- active → bool
-
Returns whether the widget is currently active, meaning that only one
pointer is interacting with the widget.
no setterinherited
- activeLine → SketchLine?
-
The line that is currently being drawn
no setter
-
activePointerIds
→ List<
int> -
The ids of all supported pointers that are currently interacting with
the widget.
no setter
- allowedPointersMode → ScribblePointerMode
-
Which pointers are allowed for drawing and will be captured by the
scribble widget.
no setter
-
copyWith
→ _$$DrawingImplCopyWith<
_$DrawingImpl> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
lines
→ List<
SketchLine> -
Returns the list of lines that should be drawn on the canvas by
combining the sketches lines with the current active line if it exists.
no setterinherited
- pointerPosition → Point?
-
The current position of the pointer
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleFactor → double
-
How much the widget is scaled at the moment.
no setter
- selectedColor → int
-
The color that is currently being drawn with
no setter
- selectedWidth → double
-
The current width of the pen
no setter
- sketch → Sketch
-
The current state of the sketch
no setter
-
supportedPointerKinds
→ Set<
PointerDeviceKind> -
Returns a set of
PointerDeviceKind
that represents the currently supported devices, depending on ScribbleState.allowedPointersMode.no setterinherited
Methods
-
map<
TResult extends Object?> ({required TResult drawing(Drawing value), required TResult erasing(Erasing value)}) → TResult -
inherited
-
mapOrNull<
TResult extends Object?> ({TResult? drawing(Drawing value)?, TResult? erasing(Erasing value)?}) → TResult? -
inherited
-
maybeMap<
TResult extends Object?> ({TResult drawing(Drawing value)?, TResult erasing(Erasing value)?, required TResult orElse()}) → TResult -
inherited
-
maybeWhen<
TResult extends Object?> ({TResult drawing(Sketch sketch, SketchLine? activeLine, ScribblePointerMode allowedPointersMode, List< int> activePointerIds, Point? pointerPosition, int selectedColor, double selectedWidth, double scaleFactor)?, TResult erasing(Sketch sketch, ScribblePointerMode allowedPointersMode, List<int> activePointerIds, Point? pointerPosition, double selectedWidth, double scaleFactor)?, required TResult orElse()}) → TResult -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult drawing(Sketch sketch, SketchLine? activeLine, ScribblePointerMode allowedPointersMode, List< int> activePointerIds, Point? pointerPosition, int selectedColor, double selectedWidth, double scaleFactor), required TResult erasing(Sketch sketch, ScribblePointerMode allowedPointersMode, List<int> activePointerIds, Point? pointerPosition, double selectedWidth, double scaleFactor)}) → TResult -
inherited
-
whenOrNull<
TResult extends Object?> ({TResult? drawing(Sketch sketch, SketchLine? activeLine, ScribblePointerMode allowedPointersMode, List< int> activePointerIds, Point? pointerPosition, int selectedColor, double selectedWidth, double scaleFactor)?, TResult? erasing(Sketch sketch, ScribblePointerMode allowedPointersMode, List<int> activePointerIds, Point? pointerPosition, double selectedWidth, double scaleFactor)?}) → TResult? -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited