title: Flutter - Slide Transition between two different sized widgets
body: <p>I am trying to animate between widgets as follows:</p>
  <pre><code>AnimatedSwitcher(
                    duration: const Duration(seconds: 1),
                    transitionBuilder: (Widget child, Animation&lt;double&gt; animation) {
                      return SlideTransition(
                        position: Tween(
                            begin: Offset(1.0, 0.0),
                            end: Offset(0.0, 0.0),)
                            .animate(animation),
                        child: child,
                      );
                    },
                    child: Provider.of&lt;UserWidgets&gt;(context, listen: false).renderWidget(context),
                  ),
  </code></pre>
  <p>This works fine but for two different sized widgets its not smooth because of <code>OffSet</code>.
  <a href="https://i.stack.imgur.com/LMsqb.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LMsqb.gif" alt="GIF" /></a></p>