mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-09-04 03:16:42 +00:00
catch late init error
This commit is contained in:
parent
a8fe9060f6
commit
25cb08e0f2
1 changed files with 9 additions and 5 deletions
|
@ -154,11 +154,15 @@ class AnimatedDialogState extends State<AnimatedDialog> with SingleTickerProvide
|
||||||
_sizeAnimation = _sizeTween.animate(_defaultCurvedAnimation);
|
_sizeAnimation = _sizeTween.animate(_defaultCurvedAnimation);
|
||||||
|
|
||||||
final globalOffset = renderBox.localToGlobal(Offset.zero);
|
final globalOffset = renderBox.localToGlobal(Offset.zero);
|
||||||
_closedOffset = Offset(
|
try {
|
||||||
//TODO: when updating layout or changing one of selected picker values, X offset is negative for some reason
|
_closedOffset = Offset(
|
||||||
globalOffset.dx > 0 ? globalOffset.dx : _closedOffset.dx,
|
//TODO: when updating layout or changing one of selected picker values, X offset is negative for some reason
|
||||||
globalOffset.dy,
|
globalOffset.dx > 0 ? globalOffset.dx : _closedOffset.dx,
|
||||||
);
|
globalOffset.dy,
|
||||||
|
);
|
||||||
|
} catch (_) {
|
||||||
|
_closedOffset = globalOffset;
|
||||||
|
}
|
||||||
_offsetAnimation = SizeTween(
|
_offsetAnimation = SizeTween(
|
||||||
begin: Size(
|
begin: Size(
|
||||||
_closedOffset.dx + _closedSize.width / 2,
|
_closedOffset.dx + _closedSize.width / 2,
|
||||||
|
|
Loading…
Reference in a new issue