mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 23:40:41 +00:00
revert
This commit is contained in:
parent
e554b2ef2e
commit
602e31f425
2 changed files with 5 additions and 30 deletions
|
@ -162,30 +162,6 @@ class AnimatedDialogState extends State<AnimatedDialog> with SingleTickerProvide
|
||||||
}
|
}
|
||||||
|
|
||||||
void _openDialog() {
|
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(
|
Navigator.of(context).push(
|
||||||
PageRouteBuilder(
|
PageRouteBuilder(
|
||||||
barrierColor: Colors.transparent,
|
barrierColor: Colors.transparent,
|
||||||
|
@ -197,19 +173,19 @@ class AnimatedDialogState extends State<AnimatedDialog> with SingleTickerProvide
|
||||||
child: _AnimatedOverlay(
|
child: _AnimatedOverlay(
|
||||||
controller: _animationController,
|
controller: _animationController,
|
||||||
barrierColorAnimation: _barrierColorAnimation,
|
barrierColorAnimation: _barrierColorAnimation,
|
||||||
sizeAnimation: sizeAnimation,
|
sizeAnimation: _sizeAnimation,
|
||||||
offsetAnimation: offsetAnimation,
|
offsetAnimation: _offsetAnimation,
|
||||||
borderRadiusAnimation: _borderRadiusAnimation,
|
borderRadiusAnimation: _borderRadiusAnimation,
|
||||||
foregroundColorAnimation: _foregroundColorAnimation,
|
foregroundColorAnimation: _foregroundColorAnimation,
|
||||||
elevationAnimation: _elevationAnimation,
|
elevationAnimation: _elevationAnimation,
|
||||||
onDismiss: close,
|
onDismiss: close,
|
||||||
builder: widget.closedChild != null && widget.openedChild != null
|
builder: widget.closedChild != null && widget.openedChild != null
|
||||||
? (_) => _AnimatedSwitcher(
|
? (_) => _AnimatedSwitcher(
|
||||||
sizeAnimation: sizeAnimation,
|
sizeAnimation: _sizeAnimation,
|
||||||
closedOpacityAnimation: _closedOpacityAnimation,
|
closedOpacityAnimation: _closedOpacityAnimation,
|
||||||
openedOpacityAnimation: _openedOpacityAnimation,
|
openedOpacityAnimation: _openedOpacityAnimation,
|
||||||
closedSize: sizeTween.begin!,
|
closedSize: _sizeTween.begin!,
|
||||||
openedSize: sizeTween.end!,
|
openedSize: _sizeTween.end!,
|
||||||
closedChild: widget.closedChild!,
|
closedChild: widget.closedChild!,
|
||||||
openedChild: widget.openedChild!,
|
openedChild: widget.openedChild!,
|
||||||
)
|
)
|
||||||
|
|
|
@ -143,7 +143,6 @@ class MeteringContainerBuidler extends StatelessWidget {
|
||||||
if (ev.isNaN || ev.isInfinite) {
|
if (ev.isNaN || ev.isInfinite) {
|
||||||
return List.empty();
|
return List.empty();
|
||||||
}
|
}
|
||||||
return List.empty();
|
|
||||||
|
|
||||||
/// Depending on the `stopType` the exposure pairs list length is multiplied by 1,2 or 3
|
/// Depending on the `stopType` the exposure pairs list length is multiplied by 1,2 or 3
|
||||||
final int evSteps = (ev * (stopType.index + 1)).round();
|
final int evSteps = (ev * (stopType.index + 1)).round();
|
||||||
|
|
Loading…
Reference in a new issue