0
The Solution I found was to add a InputDecorator
, thus being able to style any object inside the container as is the textField of my App.
Inside the Child of InputDecorator
add the widget
which I will use, and then add to Decoration
of InputDecorator
the edge and the label I want, leaving it just the way I wanted it.
child: Container(
color: Colors.white,
child: InputDecorator(
child: DropdownButtonHideUnderline(
child: new DropdownButton(
value: itemSelected,
onChanged: (String newValue) {
setState(() {});
},
hint: new Text("Selecione"),
isDense: true,
items: <String>[' ', 'Sim', 'Não']
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
})
.toList(),
),
),
decoration: new InputDecoration(
contentPadding: const EdgeInsets.all(11.0),
labelText:(this.label != null ? this.label : ""),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: borderColor()
),),
border: OutlineInputBorder(
borderSide: BorderSide(color: Colors.black)))),
));