title: How to assign class type to variables on dart
body: <p>I'm new to flutter and dart.</p>
  
  <p>I want to transition with drawer like below.</p>
  
  <pre><code>class Page {
    String title;
    var page;
    Page(this.title, this.page);
  }
  
  class CommonDrawer extends StatelessWidget {
    var _pages = [Page('Home', HomePage),
                Page('Form', FormPage)];
  
    @override
    Widget build(BuildContext context) {
      return Drawer(
          child: ListView(
        children: &lt;Widget&gt;[
          for (final p in _pages) genTile(p, context),
        ]
  
    ListTile genTile(Page page, context) {
        ~~~~~~~ Omitted ~~~~~~~~~~
        Navigator.push(
          context, MaterialPageRoute(builder: (context) =&gt; page.page()));
    }
  }
  </code></pre>
  
  <p>but console says</p>
  
  <pre><code>Attempted to use type 'FormPage' as a function. Since types do not define a method 'call', this is not possible. Did you intend to call the FormPage constructor and forget the 'new' operator?
  </code></pre>
  
  <p>new page.page() is compile error.</p>
  
  <p>Do anyone know right way of this on dart?</p>