From a6fe85a981e7e4a25d6a6b8a9df167bf1f25299c Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sat, 26 Nov 2022 22:34:28 +0300 Subject: [PATCH] adjusted settings animation --- lib/main.dart | 2 +- lib/screens/settings/settings_page_route_builder.dart | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 7f1f928..3880f69 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -78,7 +78,7 @@ class _ApplicationState extends State with TickerProviderStateMixin } void _onSettingsPop() { - Future.delayed(Dimens.durationSM).then((_) { + Future.delayed(Dimens.durationM).then((_) { if (!_animationController.isAnimating && _animationController.status != AnimationStatus.dismissed) { _animationController.reverse(); } diff --git a/lib/screens/settings/settings_page_route_builder.dart b/lib/screens/settings/settings_page_route_builder.dart index 8a22316..dd6a692 100644 --- a/lib/screens/settings/settings_page_route_builder.dart +++ b/lib/screens/settings/settings_page_route_builder.dart @@ -6,8 +6,8 @@ class SettingsPageRouteBuilder extends PageRouteBuilder { SettingsPageRouteBuilder() : super( transitionDuration: - Dimens.durationM + Dimens.durationS, // wait for `MeteringScreenAnimatedSurface`s to expand - reverseTransitionDuration: Dimens.durationS, + Dimens.durationM + Dimens.durationM, // wait for `MeteringScreenAnimatedSurface`s to expand + reverseTransitionDuration: Dimens.durationM, pageBuilder: (context, animation, secondaryAnimation) => const SettingsScreen(), transitionsBuilder: (context, animation, secondaryAnimation, child) { final didPop = !(animation.value != 0.0 && secondaryAnimation.value == 0.0); @@ -21,7 +21,7 @@ class SettingsPageRouteBuilder extends PageRouteBuilder { ); } else { interval = Interval( - Dimens.durationM.inMilliseconds / (Dimens.durationM + Dimens.durationS).inMilliseconds, + Dimens.durationM.inMilliseconds / (Dimens.durationM + Dimens.durationM).inMilliseconds, 1.0, curve: Curves.linear, );