title: How do I call async property in Widget build method
body: <p>I'm new to Flutter and Dart, and I'm trying to build a Flutter app which displays the device information on the screen. For this purpose I'm trying to use this library: 'device_info' from here: <a href="https://pub.dartlang.org/packages/device_info#-readme-tab-" rel="noreferrer">https://pub.dartlang.org/packages/device_info#-readme-tab-</a></p>
  
  <p>In the 'build' method of the MyApp class, I am trying to instantiate the object from 'device_info' package and call a property which happens to be an async property. Since the default build method is not asynchronous, how do I call this property in the build method? Following is my code:</p>
  
  <pre><code>class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
      AndroidDeviceInfo androidDeviceInfo = await deviceInfoPlugin.androidInfo;
      return MaterialApp(
        title: 'My Device Info',
        home: Scaffold(
          appBar: AppBar(
            title: Text('My Device Info'),
          ),
          body: Center(
            child: Text('Device model:' + 'Moto'),
          ),
        ),
      );
    }
  }
  </code></pre>