title: Flutter 2.2.3 : The argument type 'Animation<dynamic>' can't be assigned to the parameter type 'Animation<double>'
body: <p>I tried to pass list position from this and get this error : The argument type 'Animation' can't be assigned to the parameter type 'Animation'. I follow the steps from a youtuber, and can check full code here:<a href="https://github.com/codespiration/petadoption/blob/master/menu_frame.dart" rel="nofollow noreferrer">https://github.com/codespiration/petadoption/blob/master/menu_frame.dart</a> . Really appreciate you guys help</p>
  <pre><code>&gt; @override   void initState() {
  &gt;     super.initState();
  &gt;     _animationController = AnimationController(vsync: this, duration: duration);
  &gt;     scaleAnimation =
  &gt;         Tween&lt;double&gt;(begin: 1.0, end: 0.6).animate(_animationController);
  &gt;     smallerScaleAnimation =
  &gt;         Tween&lt;double&gt;(begin: 1.0, end: 0.5).animate(_animationController);
  &gt; 
  &gt;     scaleAnimations = [
  &gt;       Tween&lt;double&gt;(begin: 1.0, end: 0.7).animate(_animationController),
  &gt;       Tween&lt;double&gt;(begin: 1.0, end: 0.6).animate(_animationController),
  &gt;       Tween&lt;double&gt;(begin: 1.0, end: 0.5).animate(_animationController),
  &gt;     ];
  &gt;     _animationController.forward();   }
  &gt; 
  &gt; Widget buildScreenStack(int position) {
  &gt;     final deviceWidth = MediaQuery.of(context).size.width;
  &gt;     return AnimatedPositioned(
  &gt;       duration: duration,
  &gt;       top: 0,
  &gt;       bottom: 0,
  &gt;       left: menuOpen ? deviceWidth * 0.35 : 0.0,
  &gt;       right: menuOpen ? deviceWidth * -0.65 : 0.0,
  &gt;       child: ScaleTransition(
  &gt;         scale: scaleAnimations[position],
  &gt;         child: GestureDetector(
  &gt;           onTap: () {
  &gt;             if (menuOpen) {
  &gt;               setState(() {
  &gt;                 menuOpen = false;
  &gt;                 _animationController.reverse();
  &gt;               });
  &gt;             }
  &gt;           },
  &gt;           child: AbsorbPointer(
  &gt;             absorbing: menuOpen,
  &gt;             child: Stack(
  &gt;               children: &lt;Widget&gt;[
  &gt;                 Material(
  &gt;                   animationDuration: duration,
  &gt;                   borderRadius: BorderRadius.circular(menuOpen ? 30.0 : 0.0),
  &gt;                   child: screens[position],
  &gt;                 ),
  &gt;               ],
  &gt;             ),
  &gt;           ),
  &gt;         ),
  &gt;       ),
  &gt;     );   }
  &gt; 
  &gt;   @override   Widget build(BuildContext context) {
  &gt;     final deviceWidth = MediaQuery.of(context).size.width;
  &gt;     return Stack(
  &gt;       children: finalStack(),
  &gt;     );   } }
  </code></pre>