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 animation
- animate: Whether the animation should start automatically
- manualTrigger: Whether animation requires manual triggering
- infinite: Whether animation should loop infinitely
- onFinish: Callback function when animation completes
- controllerCallback: 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);
  }
}