mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
adjusted settings animation
This commit is contained in:
parent
ce04dcf257
commit
a6fe85a981
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue