title: Flutter animated rotation with relayout
body: <p>I need to rotate a widget with animation and perform relayout.</p>
  <p>RotatedBox does just what I want but without animation.</p>
  <p>I used TweenAnimationBuilder and Transform.rotate. They do animated rotation, but keep width constraints and don't resize the child.</p>
  <pre class="lang-dart prettyprint-override"><code>  Widget build(BuildContext context) {
      return TweenAnimationBuilder&lt;double&gt;(
        tween: Tween&lt;double&gt;(begin: 0, end: pi / 2),
        duration: const Duration(milliseconds: 500),
        builder: (BuildContext context, double angle, Widget? child) {
          return Transform.rotate(
            angle: angle,
            child: Stack(
              children: [
                Image.network('https://i.imgur.com/Xl3LjXZ.jpeg'),
                Image.network('https://i.imgur.com/tF3g1JA.jpeg',
                    width: 30, height: 30),
              ],
            ),
          );
        },
      );
    }
  </code></pre>
  <p>I can use scale transform but I don't want all the widgets in the child to be scaled.</p>
  <p>How can I do animated rotation with child relayout? Thanks.</p>
  <p><a href="https://dartpad.dev/?id=86c8e1c2626186bc731cdcc41755b40b" rel="nofollow noreferrer">Dartpad example</a> (make the result frame narrow like mobile device)</p>