title: Flutter/Dart Create container automatically when new user is created
body: <p>I am new with Flutter... How can I do it, please: when I insert new Technicians, it creates a new card (container) automatically. I used <code>for (int i = 0; i &lt; 10; i++)</code> to test it.</p>
  <pre><code> return Container(
            height: height,
            width: width,
            child: Scaffold(
                body: Stack(
                  children: &lt;Widget&gt;[
      GoogleMap(
                      initialCameraPosition: _initialLocation,
                      myLocationEnabled: true,
                      myLocationButtonEnabled: false,
                      mapType: MapType.normal,
                      zoomGesturesEnabled: true,
                      zoomControlsEnabled: false,
                      onMapCreated: (GoogleMapController controller) {
                        mapController = controller;
                      },
                    ),
      
      
                    Container(
                      padding: EdgeInsets.only(top: 550, bottom: 50),
                      child: ListView(
                        padding: EdgeInsets.only(left: 20),
                        children: getTechniciansInArea(),
                        scrollDirection: Axis.horizontal,
                      ),
                    ),
                  ],
                )
            ),
          );
        }
  
  List&lt;Technician&gt; getTechies() {
      List&lt;Technician&gt; techies = [];
      //For testing...
       //for (int i = 0; i &lt; 10; i++) {
  
     
      Technician myTechy = Technician(&quot;Store name test&quot;, &quot;Address store &quot;, &quot;Address costumer&quot;, 529.3, 4, &quot;Available&quot;, &quot;fdfd&quot;);
  
      techies.add(myTechy);
      //}
      return techies;
    }
  
    List&lt;Widget&gt; getTechniciansInArea() {
      List&lt;Technician&gt; techies2 = getTechies();
      List&lt;Widget&gt; cards = [];
      for (Technician techy in techies2) {
        cards.add(technicianCard(techy, context));
      }
      return cards;
    }
  }
  
  Widget technicianCard(Technician technician, BuildContext context) {
    return
      InkWell( // when click...
          child:
          Container(
              padding: EdgeInsets.all(10),
              margin: EdgeInsets.only(right: 20),
              width: 180,
              decoration: BoxDecoration(
                borderRadius: BorderRadius.all(Radius.circular(20)),
                color: Colors.white,
                boxShadow: [
                  BoxShadow(
                    color: Colors.grey,
                    blurRadius: 0.5,
                  ),],
              ),
              child:
              Column(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: &lt;Widget&gt;[
  
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: &lt;Widget&gt;[
                        SizedBox(height: 5,),
                        Text(technician.name, style: TextStyle(fontSize: 19,fontWeight: FontWeight.bold), textAlign: TextAlign.center),
                        SizedBox(height: 10,),
                        Text(&quot;AS: &quot; + technician.phoneNum, style: TextStyle(fontSize: 15)),
                        SizedBox(height: 10,),
                        Text(&quot;AC: &quot; + technician.address, style: TextStyle(fontSize: 15)),
                        SizedBox(height: 30,),
                      ],
                    ),
  
                    GestureDetector(
                      child:
                      Container(
                          alignment: Alignment.bottomCenter,
                          width: 120.0,
                          height: 40.0,
                          decoration: BoxDecoration(
                            borderRadius: BorderRadius.all(Radius.circular(10)),
                            color: Color(0xffeb5c68),
                          ),
                          child:
                          Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              children: &lt;Widget&gt;[
  
  
                                Text(&quot;REQUEST&quot;, textAlign: TextAlign.center,style: TextStyle(color: Colors.white),),
                              ]
                          )
                      ),
                      onLongPress: (){
  
                        Navigator.push(
                          context,
                          MaterialPageRoute(builder: (context) =&gt; Page2()),
                        );
                      },
                    )
                  ]
              )
          ),
  
          onTap: () {
  
          }
      );
  }
  
      //********************************** PAGE 2 **********************************
  class Page2 extends StatelessWidget {
  
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text(&quot;YOUR ORDERS&quot;),
          backgroundColor: Colors.green
        ),
      );
    }
  }
  </code></pre>
  <p>The <code>Technician</code> class</p>
  <pre><code>class Technician {
    String name;
    String phoneNum;
    String address;
    double rate;
    String status;
    int rating;
    String occupation;
  
    Technician(this.name, this.phoneNum, this.address, this.rate, this.rating, this.status, this.occupation);
  }
  </code></pre>