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