diff --git a/lib/res/dimens.dart b/lib/res/dimens.dart index c5657ab..45756e2 100644 --- a/lib/res/dimens.dart +++ b/lib/res/dimens.dart @@ -1,3 +1,5 @@ +import 'package:flutter/material.dart'; + /// `valueM` represents the base value. /// All other values differs by 8dp. class Dimens { @@ -32,4 +34,8 @@ class Dimens { static const double cameraSliderTrackRadius = cameraSliderTrackHeight / 2; static const double cameraSliderHandleSize = 32; static const double cameraSliderHandleIconSize = cameraSliderHandleSize * 2 / 3; + + // Dialog + // Taken from `Dialog` documentation + static const EdgeInsets dialogMargin = EdgeInsets.symmetric(horizontal: 40.0, vertical: 24.0); } diff --git a/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart b/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart index 068804e..d2eac90 100644 --- a/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart +++ b/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart @@ -93,8 +93,10 @@ class AnimatedDialogState extends State with SingleTickerProvide begin: _closedSize, end: widget.openedSize ?? Size( - mediaQuery.size.width - mediaQuery.padding.horizontal - Dimens.paddingM * 2, - mediaQuery.size.height - mediaQuery.padding.vertical - Dimens.paddingM * 2, + mediaQuery.size.width - + mediaQuery.padding.horizontal - + Dimens.dialogMargin.horizontal, + mediaQuery.size.height - mediaQuery.padding.vertical - Dimens.dialogMargin.vertical, ), ); _sizeAnimation = _sizeTween.animate(_defaultCurvedAnimation);