Fix dropdown width

This commit is contained in:
Yegor Vialov
2018-10-16 23:30:17 +03:00
parent a308aa29a4
commit 5ca4424933

View File

@ -682,9 +682,15 @@ class ModeSelectorWidget extends StatelessWidget {
Text("$caption", style: TextStyle( Text("$caption", style: TextStyle(
fontSize: captionFontSize ?? Entity.stateFontSize fontSize: captionFontSize ?? Entity.stateFontSize
)), )),
DropdownButton<String>( Row(
children: <Widget>[
Expanded(
child: ButtonTheme(
alignedDropdown: true,
child: DropdownButton<String>(
value: "$value", value: "$value",
iconSize: 30.0, iconSize: 30.0,
isExpanded: true,
style: TextStyle( style: TextStyle(
fontSize: valueFontSize ?? Entity.largeFontSize, fontSize: valueFontSize ?? Entity.largeFontSize,
color: Colors.black, color: Colors.black,
@ -692,11 +698,15 @@ class ModeSelectorWidget extends StatelessWidget {
items: options.map((String value) { items: options.map((String value) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(
value: value, value: value,
child: new Text(value), child: Text(value),
); );
}).toList(), }).toList(),
onChanged: (mode) => onChange(mode), onChanged: (mode) => onChange(mode),
), ),
),
)
],
),
Container(height: bottomPadding ?? Entity.rowPadding,) Container(height: bottomPadding ?? Entity.rowPadding,)
], ],
); );