title: flutter create dynamic TextField when button click
body: <p><a href="https://i.stack.imgur.com/DA65X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DA65X.png" alt="enter image description here" /></a></p>
  <p>Here is my requirement, when I click the Add button, dynamically new cards with three TextFields should be generated, and how to assign each TextField with dynamically created TextEditingControllers&gt;  or is there any other way to take value from TextFields?</p>
  <pre><code>final name1 = new TextField(
      controller: name1Controller,
      decoration: InputDecoration(
          labelText: 'Full Name', border: OutlineInputBorder()));
  
  final age1 = new TextField(
      controller: age1Controler,
      keyboardType: TextInputType.number,
      decoration:
          InputDecoration(labelText: 'Age', border: OutlineInputBorder()));
  
  final studyjob1 = new TextField(
      controller: study1Controller,
      decoration: InputDecoration(
          labelText: 'Study / Job', border: OutlineInputBorder()));
  
  final person1Card = new Card(
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(15.0),
    ),
    elevation: 10,
    child: Padding(
      padding: EdgeInsets.only(top: 2.0, left: 6.0, right: 6.0, bottom: 2.0),
      child: Column(
        children: &lt;Widget&gt;[
          Text('Person 1'),
          SizedBox(height: 3.0),
          name1,
          SizedBox(height: 10.0),
          age1,
          SizedBox(height: 10.0),
          studyjob1,
          SizedBox(height: 10.0),
        ],
      ),
    ),
  );
  </code></pre>
  <hr />
  <pre><code>return Scaffold(
      appBar: AppBar(
        title: Text('New Entry'),
      ),
      body: SingleChildScrollView(
        child: Container(
          child: Container(
            color: Colors.white,
            child: Padding(
              padding: const EdgeInsets.all(15.0),
              child: Column(
                children: &lt;Widget&gt;[
                  person1Card,
                  SizedBox(
                    height: 10.0,
                  ),
                  saveButton
                ],
              ),
            ),
          ),
        ),
      ))
  </code></pre>