diff --git a/lib/src/screen_transitions/nes_fill.dart b/lib/src/screen_transitions/nes_fill.dart index 3b78493..3602d7d 100644 --- a/lib/src/screen_transitions/nes_fill.dart +++ b/lib/src/screen_transitions/nes_fill.dart @@ -15,11 +15,12 @@ class NesFillTransition extends NesOverlayTransitionWidget { /// Creates a route with this animation. static PageRouteBuilder route({ required RoutePageBuilder pageBuilder, + Duration duration = const Duration(milliseconds: 750), }) { return PageRouteBuilder( pageBuilder: pageBuilder, - reverseTransitionDuration: const Duration(milliseconds: 750), - transitionDuration: const Duration(milliseconds: 750), + reverseTransitionDuration: duration, + transitionDuration: duration, transitionsBuilder: (context, animation, secondaryAnimation, child) { return NesFillTransition( animation: animation, diff --git a/lib/src/screen_transitions/nes_horizontal_close.dart b/lib/src/screen_transitions/nes_horizontal_close.dart index e76ea3a..193217b 100644 --- a/lib/src/screen_transitions/nes_horizontal_close.dart +++ b/lib/src/screen_transitions/nes_horizontal_close.dart @@ -16,11 +16,12 @@ class NesHorizontalCloseTransition extends NesOverlayTransitionWidget { /// Creates a route with this animation. static PageRouteBuilder route({ required RoutePageBuilder pageBuilder, + Duration duration = const Duration(milliseconds: 750), }) { return PageRouteBuilder( pageBuilder: pageBuilder, - reverseTransitionDuration: const Duration(milliseconds: 750), - transitionDuration: const Duration(milliseconds: 750), + reverseTransitionDuration: duration, + transitionDuration: duration, transitionsBuilder: (context, animation, secondaryAnimation, child) { return NesHorizontalCloseTransition( animation: animation, diff --git a/lib/src/screen_transitions/nes_horizontal_grid.dart b/lib/src/screen_transitions/nes_horizontal_grid.dart index 28c049f..8189ead 100644 --- a/lib/src/screen_transitions/nes_horizontal_grid.dart +++ b/lib/src/screen_transitions/nes_horizontal_grid.dart @@ -16,11 +16,12 @@ class NesHorizontalGridTransition extends NesOverlayTransitionWidget { /// Creates a route with this animation. static PageRouteBuilder route({ required RoutePageBuilder pageBuilder, + Duration duration = const Duration(milliseconds: 1750), }) { return PageRouteBuilder( pageBuilder: pageBuilder, - reverseTransitionDuration: const Duration(milliseconds: 1750), - transitionDuration: const Duration(milliseconds: 1750), + reverseTransitionDuration: duration, + transitionDuration: duration, transitionsBuilder: (context, animation, secondaryAnimation, child) { return NesHorizontalGridTransition( animation: animation, diff --git a/lib/src/screen_transitions/nes_vertical_close.dart b/lib/src/screen_transitions/nes_vertical_close.dart index 1c6e364..1621614 100644 --- a/lib/src/screen_transitions/nes_vertical_close.dart +++ b/lib/src/screen_transitions/nes_vertical_close.dart @@ -16,11 +16,12 @@ class NesVerticalCloseTransition extends NesOverlayTransitionWidget { /// Creates a route with this animation. static PageRouteBuilder route({ required RoutePageBuilder pageBuilder, + Duration duration = const Duration(milliseconds: 750), }) { return PageRouteBuilder( pageBuilder: pageBuilder, - reverseTransitionDuration: const Duration(milliseconds: 750), - transitionDuration: const Duration(milliseconds: 750), + reverseTransitionDuration: duration, + transitionDuration: duration, transitionsBuilder: (context, animation, secondaryAnimation, child) { return NesVerticalCloseTransition( animation: animation, diff --git a/lib/src/screen_transitions/nes_vertical_grid.dart b/lib/src/screen_transitions/nes_vertical_grid.dart index 57566cb..099c9f2 100644 --- a/lib/src/screen_transitions/nes_vertical_grid.dart +++ b/lib/src/screen_transitions/nes_vertical_grid.dart @@ -16,11 +16,12 @@ class NesVerticalGridTransition extends NesOverlayTransitionWidget { /// Creates a route with this animation. static PageRouteBuilder route({ required RoutePageBuilder pageBuilder, + Duration duration = const Duration(milliseconds: 1750), }) { return PageRouteBuilder( pageBuilder: pageBuilder, - reverseTransitionDuration: const Duration(milliseconds: 1750), - transitionDuration: const Duration(milliseconds: 1750), + reverseTransitionDuration: duration, + transitionDuration: duration, transitionsBuilder: (context, animation, secondaryAnimation, child) { return NesVerticalGridTransition( animation: animation,