StrokeOptions class

The options object for getStroke or getStrokePoints.

Constructors

StrokeOptions({double? size, double? thinning, double? smoothing, double? streamline, double easing(double)?, bool? simulatePressure, StrokeEndOptions? start, StrokeEndOptions? end, bool? isComplete})
StrokeOptions.fromJson(Map<String, dynamic> json, {double easing(double)?, double startEasing(double)?, double endEasing(double)?})

Properties

easing double Function(double)
An easing function to apply to each point's pressure.
getter/setter pair
end StrokeEndOptions
Cap, taper, and easing for the end of the line.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
isComplete bool
Whether to handle the points as a completed stroke.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
simulatePressure bool
Whether to simulate pressure based on velocity.
getter/setter pair
size double
The base size (diameter) of the stroke.
getter/setter pair
smoothing double
How much to soften the stroke's edges.
getter/setter pair
start StrokeEndOptions
Cap, taper, and easing for the start of the line.
getter/setter pair
streamline double
getter/setter pair
thinning double
The effect of pressure on the stroke's size.
getter/setter pair

Methods

copyWith({double? size, double? thinning, double? smoothing, double? streamline, double easing(double)?, bool? simulatePressure, StrokeEndOptions? start, StrokeEndOptions? end, bool? isComplete}) StrokeOptions
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Note that the easing functions aren't serialized. If you need this functionality, please open an issue or PR.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

defaultEasing double Function(double)
getter/setter pair
defaultIsComplete bool
getter/setter pair
defaultSimulatePressure bool
getter/setter pair
defaultSize double
getter/setter pair
defaultSmoothing double
getter/setter pair
defaultStreamline double
getter/setter pair
defaultThinning double
getter/setter pair