tween method
- required double duration,
- Object? blurX,
- Object? blurY,
- Object? angle,
- Object? distance,
- Color? color,
- EaseFunction? ease,
- double? delay,
- bool? useFrames,
- int overwrite = 1,
- VoidCallback? onStart,
- Object? onStartParams,
- VoidCallback? onComplete,
- Object? onCompleteParams,
- VoidCallback? onUpdate,
- Object? onUpdateParams,
- bool? runBackwards,
- bool? immediateRender,
- Map? startAt,
Creates a tween of the GDropShadowFilter properties.
duration
is the duration of the tween.
blurX
is the horizontal blur amount.
blurY
is the vertical blur amount.
angle
is the angle of the drop shadow.
distance
is the distance of the drop shadow.
color
is the color of the drop shadow.
ease
is the easing function for the tween.
delay
is the delay before starting the tween.
useFrames
specifies whether to use frames for the tween.
overwrite
specifies the behavior when overwriting an existing tween.
onStart
is a callback function that is called when the tween starts.
onStartParams
are the parameters for the onStart callback function.
onComplete
is a callback function that is called when the tween
completes.
onCompleteParams
are the parameters for the onComplete callback
function.
onUpdate
is a callback function that is called when the tween updates.
onUpdateParams
are the parameters for the onUpdate callback function.
runBackwards
specifies whether to run the tween backwards.
immediateRender
specifies whether to immediately render the tween.
startAt
is a map of properties to set before starting the tween.
Implementation
GTween tween({
required double duration,
Object? blurX,
Object? blurY,
Object? angle,
Object? distance,
Color? color,
EaseFunction? ease,
double? delay,
bool? useFrames,
int overwrite = 1,
VoidCallback? onStart,
Object? onStartParams,
VoidCallback? onComplete,
Object? onCompleteParams,
VoidCallback? onUpdate,
Object? onUpdateParams,
bool? runBackwards,
bool? immediateRender,
Map? startAt,
}) {
final targetMap = {
if (blurX != null) 'blurX': blurX,
if (blurY != null) 'blurY': blurY,
if (angle != null) 'angle': angle,
if (distance != null) 'distance': distance,
if (color != null) 'color': color,
};
return GTween.to(
this,
duration,
targetMap,
GVars(
ease: ease,
delay: delay,
useFrames: useFrames,
overwrite: overwrite,
onStart: onStart,
onStartParams: onStartParams,
onComplete: onComplete,
onCompleteParams: onCompleteParams,
onUpdate: onUpdate,
onUpdateParams: onUpdateParams,
runBackwards: runBackwards,
immediateRender: immediateRender,
startAt: startAt,
));
}