GemAnimation constructor
- AnimationType type = AnimationType.none,
- int duration = -1,
- void onCompleted()?,
Constructor for the animation class.
Parameters
- IN type the animation type. By default it is AnimationType.none
- IN duration the animation duration. By default it is -1 which corresponds to no animation
- IN onCompleted the callback which is triggered when animation is completed
Implementation
GemAnimation({
this.type = AnimationType.none,
this.duration = -1,
this.onCompleted,
}) {
_progressListener = EventDrivenProgressListener();
GemKitPlatform.instance.registerEventHandler(
_progressListener.id,
_progressListener,
);
_progressListener.registerOnCompleteWithDataCallback((
final int p0,
final String p1,
final Map<dynamic, dynamic> p2,
) {
if (onCompleted != null) {
onCompleted!();
}
});
}