import 'package:flutter/widgets.dart'; class StaggeredPageRoute extends PageRouteBuilder { final Widget page; StaggeredPageRoute({required this.page}) : super( pageBuilder: (context, animation, secondaryAnimation) => page, transitionsBuilder: (context, animation, secondaryAnimation, child) { // İlk animasyon: Opacity (görünürlük) final opacityAnimation = Tween(begin: 0, end: 1).animate(CurvedAnimation( parent: animation, curve: Interval(0.0, 0.5, curve: Curves.easeIn), )); // İkinci animasyon: Scale (boyut) final scaleAnimation = Tween(begin: 0.8, end: 1).animate(CurvedAnimation( parent: animation, curve: Interval(0.5, 1.0, curve: Curves.easeOut), )); return FadeTransition( opacity: opacityAnimation, child: ScaleTransition( scale: scaleAnimation, child: child, ), ); }, ); }