title: Typedefs in Dart
body: <p>So I've been using typedefs in Dart for some time now without thinking about what they actually are. So for example in this piece of code:</p>
  
  <pre><code>new PageRouteBuilder(
    pageBuilder: (BuildContext context, Animation&lt;double&gt; animation1, Animation&lt;double&gt; animation2) =&gt; new Test(),
    transitionsBuilder: (BuildContext context, Animation&lt;double&gt; animation1, Animation&lt;double&gt; animation2, Widget child) {
      return new FadeTransition(
        child: child,
        opacity: animation1,
      );
    }
  )
  </code></pre>
  
  <p>The <code>pageBuilder</code> property expects a typedef called <a href="https://docs.flutter.io/flutter/widgets/RoutePageBuilder.html" rel="noreferrer">RoutePageBuilder</a> and for the <code>transitionsBuilder</code> property a typedef called <a href="https://docs.flutter.io/flutter/widgets/RouteTransitionsBuilder.html" rel="noreferrer">RouteTransitionsBuilder</a> is expected.  </p>
  
  <p>To me, it looks like I'm just using a function for those properties with predefined arguments from the typedef, but I'm uncertain about this.<br>
  Also, what arguments will actually be the input here? Because I've for example used <code>Animation&lt;double&gt; animation1</code> as an argument but that does not actually create a new <code>Animation</code>, or does it? If it does not, what <code>Animation</code> will actually be passed as the argument? </p>