title: How to declare async function as a variable in flutter(dart)?
body: <p>In flutter, we can declare a function as variable and call it like this</p>
  
  <pre><code>MyWidget((){print('HI');});
  
  class MyWidget extends StatelessWidget{
    final Function sayHi;
  
    MyWidget(this.sayHi);
  
    @override
    Widget build(BuildContext context) {
      sayHi();
      return ...
    }
  }
  </code></pre>
  
  <p>But what if <code>sayHi()</code> is a async function? How to declare a async function as variable? There seems no class like <code>AsyncFunction</code>. So how to achive that?</p>