configAnimation method
      
void
configAnimation({ 
    
- required Duration delay,
 - required bool animate,
 - required bool manualTrigger,
 - required bool infinite,
 - Function? onFinish,
 - dynamic controllerCallback(
- AnimationController controller
 
 
inherited
    Configures and starts the animation based on the provided parameters.
Parameters:
delay: Duration to wait before starting the animationanimate: Whether the animation should start automaticallymanualTrigger: Whether animation requires manual triggeringinfinite: Whether animation should loop infinitelyonFinish: Callback function when animation completescontrollerCallback: Callback to access the animation controller
Implementation
void configAnimation({
  required Duration delay,
  required bool animate,
  required bool manualTrigger,
  required bool infinite,
  Function? onFinish,
  Function(AnimationController controller)? controllerCallback,
}) {
  /// If the user wants to check if the animation finished, we add a listener
  if (onFinish != null) {
    controller.addStatusListener((AnimationStatus status) {
      if (status == AnimationStatus.completed) {
        onFinish(AnimateDoDirection.forward);
      } else if (status == AnimationStatus.dismissed) {
        onFinish(AnimateDoDirection.backward);
      }
    });
  }
  /// If the user wants to trigger the animation manually, we expose the controller
  if (!manualTrigger && animate) {
    Future.delayed(delay, () {
      if (disposed) return;
      (infinite) ? controller.repeat() : controller.forward();
    });
  }
  /// Returns the controller if the user requires it
  if (controllerCallback != null) {
    controllerCallback(controller);
  }
}