Scalar class
A Scalar provides an opportunity to scale axis-based double data.
Default constructor takes named paramters per axis. Use Scalar.xy
as a shortcut to only provide positional double values.
Scalar.xy(5)is equivalent toScalar(horizontal: 5, vertical: 5)and stillconst.
For use with Foils
Accelerometer sensor data may be scaled independently before they translate to gradient "twinkling" transformation (offset/translation).
Scale up the motion factor by providing Scalar.horizontal or
Scalar.vertical a value greater than 1.0,
or scale down the influence by providing 0 <= scalar <= 1.0.

For use with Rolls
In the case of a Roll, a Scalar object provides a means to direct
animation of the gradient if isAnimated is true. Also see the
min and max values.
- Mixed-in types
Constructors
- Scalar({double horizontal = 1.0, double vertical = 1.0})
-
A
Scalarprovides an opportunity to scale axis-baseddoubledata. Default constructor takes named paramters per axis. Use Scalar.xy as a shortcut to only provide positionaldoublevalues.const - Scalar.xy(double x, [double? y])
-
Positionally provide an
xor Scalar.horizontal value then ayor Scalar.vertical value; returns a constructedScalarobject.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontal → double
-
A
doublethat defaults to1.0that scalesFoildata.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vertical → double
-
A
doublethat defaults to1.0that scalesFoildata.final
Methods
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited