title: How to send variable value into an API using Flutter and Dart
body: <p>I am trying to send variable value to an API for getting user details (for that particular user after login only)</p>
  <p>Here is the code i am using (just trying to send that uid into the api link):</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>final FirebaseAuth _auth = FirebaseAuth.instance;
  getCurrentUser() async {
    final FirebaseUser user = await _auth.currentUser();
    final uid = user.uid;
    print(uid);
  }
  
  Future&lt;List&lt;User&gt;&gt; _getUsers() async {
    var data = await http.get("https://api.example.com/get/myuserid=$uid");
    var jsonData = json.decode(data.body);
    List&lt;User&gt; users = [];
    for (var u in jsonData) {
      User user = User(u["customer_id"]]);
      users.add(user);
    }
    print(users.length);
    return users;
  }</code></pre>
  </div>
  </div>
  </p>
  <p>But i am getting this error:
  ERROR:flutter/shell/common/shell.cc(210)] Dart Unhandled Exception: type '_InternalLinkedHashMap&lt;String, dynamic&gt;' is not a subtype of type 'Iterable'</p>