Done constructor

Done(
  1. Widget done, {
  2. Duration? animationDuration = const Duration(seconds: 1),
  3. Curve? curve = Curves.easeOut,
})

Implementation

Done(
  this.done, {
  this.animationDuration = const Duration(
    seconds: 1,
  ), // Default animation duration
  this.curve = Curves.easeOut, // Default animation curve
}) : super(
       transitionDuration: animationDuration!,
       // Defines the transition animation when moving to the 'done' page.
       transitionsBuilder: (context, animation, secondAnimation, child) {
         animation = CurvedAnimation(parent: animation, curve: curve!);
         // Scales the child widget from the center.
         return ScaleTransition(
           scale: animation,
           alignment: Alignment.center,
           child: child,
         );
       },
       // The actual page to build and display.
       pageBuilder: (context, animation, secondaryAnimation) {
         return done;
       },
     );