GTweenableInt class

/ --------------------------------------------------------------------------- The GTweenableInt class is used as a mixin to provide the ability to animate a single integer value. It wraps a single int value to be used by the GTween class and implements the necessary methods to make it animatable.

Mixed in types

Constructors

GTweenableInt(int target)
Creates a new GTweenableInt instance with the specified integer target.

Properties

getValue Object?
The value to be tweened. Can be a Function or the actual value.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Object?
The actual target object where we should get the accessors from. If a "wrapper" is registered under the same Type as target, GTween will use it internally to create a GTweenable. Also used by GTween to reference internally the "_nativeTarget" instead of the GTweenable instance. So you can "kill" the tween by GTweenable or using the actual object that you plan to Tween.
getter/setter pairinherited
value int?
The integer value that is wrapped.
getter/setter pair

Methods

dispose() → void
Called when the tween is disposed.
inherited
getProperty(Object prop) double
Gets the value of the property prop.
inherited
getTweenableAccessors() Map<String, List<Function>>
Returns a map of tweenable accessors that GTween can use to animate the integer value.
override
initProps() → void
This method initializes the _accessors map with the object's properties and their corresponding getter and setter functions. The getTweenableAccessors method should be implemented in the target object class and should return a map of property names and their corresponding getter and setter functions. If no such map is returned, the _accessors map remains null.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setProperty(Object property, double value) → void
Sets the value of the property property to value.
inherited
setTweenProp(PropTween tweenProp) → void
(Internal usage)
inherited
toString() String
Returns a string representation of the GTweenableInt instance.
override
tween(Object value, {required double duration, EaseFunction? ease, double? delay, bool? useFrames, int? overwrite, Function? onStart, Object? onStartParams, Function? onComplete, Object? onCompleteParams, Function? onUpdate, Object? onUpdateParams, bool? runBackwards, bool? immediateRender, Map? startAt}) GTween
Tweens this instance (defined by getValue) to the current value.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String key) double?
Overridden operator that allows to "get" the property value of a specific key without calling the getProperty method.
inherited
operator []=(String key, double value) → void
Overridden operator that allows to "set" the property value of a specific key without calling the setProperty method.
inherited

Static Methods

wrap(Object? target) GTweenable?
Wraps an integer value to be used as a target for GTween animations.