title: Flutter - Container width and height fit parent
body: <p>I have a <code>Card</code> widget which includes <code>Column</code> with several other Widgets. One of them is <code>Container</code>.</p>
  
  <pre><code>Widget _renderWidget() {
      return Column(
        children: &lt;Widget&gt;[
          Visibility(
            visible: _isVisible,
            child: Container(
                width: 300,
                height: 200,
                decoration:
                    BoxDecoration(border: Border.all(color: Colors.grey)),
                child: ListView.builder(
                  itemCount: titles.length,
                  itemBuilder: (context, index) {
                    return Card(
                      child: ListTile(
                        leading: Icon(icons[index]),
                        title: Text(titles[index]),
                      ),
                    );
                  },
                )),
          ),
        ],
      );
    }
  </code></pre>
  
  <p>Here, if I don't specify <code>width</code> and <code>height</code> I get error. But, is there a way to make them to fit parent element?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Full code:</p>
  
  <pre><code>return ListView(
        children: &lt;Widget&gt;[
          Center(
            child: Container(
              child: Card(
                  margin: new EdgeInsets.all(20.0),
                  child: new Container(
                    margin: EdgeInsets.all(20.0),
                    width: double.infinity,
                    child: Column(
                      children: &lt;Widget&gt;[
                        FormBuilder(
                          key: _fbKey,
                          autovalidate: true,
                          child: Column(
                            children: &lt;Widget&gt;[
                              FormBuilderDropdown(
  
                               onChanged: (t) {
                                  setState(() {
                                    text = t.vrsta;
                                  });
                                },
                                validators: [FormBuilderValidators.required()],
                                items: user.map((v) {
                                  return DropdownMenuItem(
                                      value: v,
                                      child: ListTile(
                                        leading: Image.asset(
                                          'assets/img/car.png',
                                          width: 50,
                                          height: 50,
                                        ),
                                        title: Text("${v.vrsta}"),
                                      ));
                                }).toList(),
                              ),
                            ],
                          ),
                        ),
                        Container(child: _renderWidget()),
                        text.isEmpty
                            ? Container()
                            : RaisedButton(
                                child: Text("Submit"),
                                onPressed: () {
                                  _fbKey.currentState.save();
                                  if (_fbKey.currentState.validate()) {
                                    print(_fbKey.currentState.value.toString());
                                    print(formData.startLocation);
                                    getAutocomplete();
                                  }
                                },
                              )
                      ],
                    ),
                  )),
            ),
          ),
        ],
      );
    }
  </code></pre>