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);
|
||||
|
||||
final globalOffset = renderBox.localToGlobal(Offset.zero);
|
||||
_closedOffset = Offset(
|
||||
//TODO: when updating layout or changing one of selected picker values, X offset is negative for some reason
|
||||
globalOffset.dx > 0 ? globalOffset.dx : _closedOffset.dx,
|
||||
globalOffset.dy,
|
||||
);
|
||||
try {
|
||||
_closedOffset = Offset(
|
||||
//TODO: when updating layout or changing one of selected picker values, X offset is negative for some reason
|
||||
globalOffset.dx > 0 ? globalOffset.dx : _closedOffset.dx,
|
||||
globalOffset.dy,
|
||||
);
|
||||
} catch (_) {
|
||||
_closedOffset = globalOffset;
|
||||
}
|
||||
_offsetAnimation = SizeTween(
|
||||
begin: Size(
|
||||
_closedOffset.dx + _closedSize.width / 2,
|
||||
|
|
Loading…
Reference in a new issue