mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 00:10:47 +00:00
sync AnimatedDialog
insets with material
This commit is contained in:
parent
31b7528e64
commit
6c08a3d47f
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
/// `valueM` represents the base value.
|
/// `valueM` represents the base value.
|
||||||
/// All other values differs by 8dp.
|
/// All other values differs by 8dp.
|
||||||
class Dimens {
|
class Dimens {
|
||||||
|
@ -32,4 +34,8 @@ class Dimens {
|
||||||
static const double cameraSliderTrackRadius = cameraSliderTrackHeight / 2;
|
static const double cameraSliderTrackRadius = cameraSliderTrackHeight / 2;
|
||||||
static const double cameraSliderHandleSize = 32;
|
static const double cameraSliderHandleSize = 32;
|
||||||
static const double cameraSliderHandleIconSize = cameraSliderHandleSize * 2 / 3;
|
static const double cameraSliderHandleIconSize = cameraSliderHandleSize * 2 / 3;
|
||||||
|
|
||||||
|
// Dialog
|
||||||
|
// Taken from `Dialog` documentation
|
||||||
|
static const EdgeInsets dialogMargin = EdgeInsets.symmetric(horizontal: 40.0, vertical: 24.0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,8 +93,10 @@ class AnimatedDialogState extends State<AnimatedDialog> with SingleTickerProvide
|
||||||
begin: _closedSize,
|
begin: _closedSize,
|
||||||
end: widget.openedSize ??
|
end: widget.openedSize ??
|
||||||
Size(
|
Size(
|
||||||
mediaQuery.size.width - mediaQuery.padding.horizontal - Dimens.paddingM * 2,
|
mediaQuery.size.width -
|
||||||
mediaQuery.size.height - mediaQuery.padding.vertical - Dimens.paddingM * 2,
|
mediaQuery.padding.horizontal -
|
||||||
|
Dimens.dialogMargin.horizontal,
|
||||||
|
mediaQuery.size.height - mediaQuery.padding.vertical - Dimens.dialogMargin.vertical,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
_sizeAnimation = _sizeTween.animate(_defaultCurvedAnimation);
|
_sizeAnimation = _sizeTween.animate(_defaultCurvedAnimation);
|
||||||
|
|
Loading…
Reference in a new issue