Hi dear @marcglasberg . I hope you are doing great.
I've been a user of this package for a long time. I just forgot to say you that it is needed to add the.expand()
constructor for the AnimatedAlignPositioned
widget.
You already added it for the AlignPositioned
. Currently, I am solving this issue by wrapping the widgets like this:
Stack(
children: [
Positioned(
top: 0,
right: 0,
left: 0,
bottom: 0,
child: AnimatedAlignPositioned(
...
...
...
So the the Positioned(top: 0, right: 0, left: 0, bottom: 0, child: child)
widget let the AnimatedAlignPositioned take the size of the parent Stack widget.
Use Case
I have another widget inside the stack that basically shows an image pager whose height is determined by an AspectRatio. Since I use the AspectRatio widget, the non-positioned child of the stack (the image pager) has no height value. However, it can be laid out. So in such a case, without the .expand()
constructor, I have to use a Positioned
widget.
Not a big deal but it could be easier to implement. (Also there might be people that do not know how the stack widget works. Sometimes, even I forget to wrap it with the Positioned(top: right: left: bottom: 0, child: child)
that makes me wonder "What I did wrong?" There can be a documentation update too.)
Thanks a lot!