adjusted settings animation

This commit is contained in:
Vadim 2022-11-26 22:34:28 +03:00
parent ce04dcf257
commit a6fe85a981
2 changed files with 4 additions and 4 deletions

View file

@ -78,7 +78,7 @@ class _ApplicationState extends State<Application> with TickerProviderStateMixin
}
void _onSettingsPop() {
Future.delayed(Dimens.durationSM).then((_) {
Future.delayed(Dimens.durationM).then((_) {
if (!_animationController.isAnimating && _animationController.status != AnimationStatus.dismissed) {
_animationController.reverse();
}

View file

@ -6,8 +6,8 @@ class SettingsPageRouteBuilder extends PageRouteBuilder<void> {
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<void> {
);
} else {
interval = Interval(
Dimens.durationM.inMilliseconds / (Dimens.durationM + Dimens.durationS).inMilliseconds,
Dimens.durationM.inMilliseconds / (Dimens.durationM + Dimens.durationM).inMilliseconds,
1.0,
curve: Curves.linear,
);