title: How do you get the values that the function outputs, to send to a firebase in a flutter?
body: <p>I want to send the company and type of phone to Firebase and I used <a href="https://pub.dev/packages/device_info" rel="nofollow noreferrer">plugin device_info</a> to get informations,
  But in firebase I get empty fields as the following image shows.</p>
  <p><a href="https://i.stack.imgur.com/u1fgX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u1fgX.png" alt="enter image description here" /></a></p>
  <p>my code</p>
  <pre><code>import 'package:device_info/device_info.dart';
  ......
    String Modele ='';
    String brand ='';
    .......
    Future&lt;void&gt;_deviceDetails() async{
      final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
      try {
        var build = await deviceInfoPlugin.androidInfo;
        setState(() {
          brand = build.brand;
          Modele = build.model;
        });
      } on PlatformException {
        print('Failed to get platform version');
      }
    }
  .........
   .......
                        RaisedButton(
                            onPressed: () async {
                                Map&lt;String, dynamic&gt; data = {
                                  &quot;marque&quot;:brand,
                                  &quot;Modele:&quot; :Modele,
                             
                                };
                             
                            var myStoredData = await readData();
                                    FirebaseFirestore.instance
                                        .collection(myStoredData)
                                        .add(data);
                            },
                           
                     .........
              
  </code></pre>