title: Only static members can be accessed in initializer
body: <p>i can not use the <code>GlobalKey</code> in <code>Scaffold</code>. The error is </p>
  
  <blockquote>
    <p>Only static members can be accessed in initializer</p>
  </blockquote>
  
  <pre><code>//Global key
    final GlobalKey&lt;ScaffoldState&gt; _mainKey= GlobalKey&lt;ScaffoldState&gt;();
  // List of TabBar
  final List&lt;Widget&gt; tabBar = &lt;Widget&gt;[
      Column(
        children: &lt;Widget&gt;[
          Icon(Icons.account_balance_wallet),
          Text('flutter'),
          Text('dart')
        ],
      ),
      FlatButton(
        child: Text('Open Drawer'),
        onPressed: (){
           //( _mainKey) has a red underLine color
          _mainKey.currentState.openDrawer();
        },
      )
    ];
  /*
  Compiler message:
  lib/Trial.dart:32:9: Error: Can't access 'this' in a field initializer to read '_mainKey'.
          _mainKey.currentState.openDrawer();*/
  </code></pre>