From 602e31f425d13f40693581560a46ebb13b1ec11b Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:21:42 +0200 Subject: [PATCH] revert --- .../widget_dialog_animated.dart | 34 +++---------------- lib/screens/metering/screen_metering.dart | 1 - 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/lib/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart b/lib/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart index 15101fb..00096ce 100644 --- a/lib/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart +++ b/lib/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart @@ -162,30 +162,6 @@ class AnimatedDialogState extends State with SingleTickerProvide } void _openDialog() { - final mediaQuery = MediaQuery.of(context); - final closedSize = _key.currentContext!.size!; - final sizeTween = SizeTween( - begin: closedSize, - end: widget.openedSize ?? - Size( - mediaQuery.size.width - mediaQuery.padding.horizontal - Dimens.dialogMargin.horizontal, - mediaQuery.size.height - mediaQuery.padding.vertical - Dimens.dialogMargin.vertical, - ), - ); - final sizeAnimation = sizeTween.animate(_defaultCurvedAnimation); - final renderBox = _key.currentContext!.findRenderObject()! as RenderBox; - final closedOffset = renderBox.localToGlobal(Offset.zero); - final offsetAnimation = SizeTween( - begin: Size( - closedOffset.dx + closedSize.width / 2, - closedOffset.dy + closedSize.height / 2, - ), - end: Size( - mediaQuery.size.width / 2, - mediaQuery.size.height / 2 + mediaQuery.padding.top / 2 - mediaQuery.padding.bottom / 2, - ), - ).animate(_defaultCurvedAnimation); - Navigator.of(context).push( PageRouteBuilder( barrierColor: Colors.transparent, @@ -197,19 +173,19 @@ class AnimatedDialogState extends State with SingleTickerProvide child: _AnimatedOverlay( controller: _animationController, barrierColorAnimation: _barrierColorAnimation, - sizeAnimation: sizeAnimation, - offsetAnimation: offsetAnimation, + sizeAnimation: _sizeAnimation, + offsetAnimation: _offsetAnimation, borderRadiusAnimation: _borderRadiusAnimation, foregroundColorAnimation: _foregroundColorAnimation, elevationAnimation: _elevationAnimation, onDismiss: close, builder: widget.closedChild != null && widget.openedChild != null ? (_) => _AnimatedSwitcher( - sizeAnimation: sizeAnimation, + sizeAnimation: _sizeAnimation, closedOpacityAnimation: _closedOpacityAnimation, openedOpacityAnimation: _openedOpacityAnimation, - closedSize: sizeTween.begin!, - openedSize: sizeTween.end!, + closedSize: _sizeTween.begin!, + openedSize: _sizeTween.end!, closedChild: widget.closedChild!, openedChild: widget.openedChild!, ) diff --git a/lib/screens/metering/screen_metering.dart b/lib/screens/metering/screen_metering.dart index 698811e..f1d11fb 100644 --- a/lib/screens/metering/screen_metering.dart +++ b/lib/screens/metering/screen_metering.dart @@ -143,7 +143,6 @@ class MeteringContainerBuidler extends StatelessWidget { if (ev.isNaN || ev.isInfinite) { return List.empty(); } - return List.empty(); /// Depending on the `stopType` the exposure pairs list length is multiplied by 1,2 or 3 final int evSteps = (ev * (stopType.index + 1)).round();