Closed jacksonw765 closed 3 years ago
Thank you for reporting the issue, indeed I think there is a problem there :/ Can you give a reproduction code please? It will help me a lot
MenuButton<String>(
menuButtonBackgroundColor: Colors.transparent,
decoration: BoxDecoration(
color: Styles.MAIN_COLOR_LIGHT, //border: Border.all(color: Colors.grey[300]!),
borderRadius: const BorderRadius.all(
Radius.circular(12.0),
),
),
//showSelectedItemOnList: false,
child: socialChildWidget(),
itemBackgroundColor: Styles.MAIN_COLOR_LIGHT,
items: this.optionValuesSocial,
itemBuilder: (String value) => Container(
color: Styles.MAIN_COLOR_LIGHT,
height: 40,
alignment: Alignment.centerLeft,
padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 16),
child: Text(
value,
style: TextStyle(color: Colors.white),
),
),
toggledChild: socialChildWidget(),
onItemSelected: (String value) async {
socialValuesIndex = optionValuesSocial.indexOf(value);
await requestProperSocial();
setState(() {});
},
// this does nothing but when I remove it it crashes so it's staying lol
onMenuButtonToggle: (bool isToggle) {},
),
Widget socialChildWidget() {
String localApiIndexValueString = optionValuesSocial[socialValuesIndex];
return Container(
width: 110,
height: 40,
child: Padding(
padding: const EdgeInsets.only(left: 16, right: 11),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Flexible(
child: Text(
localApiIndexValueString,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Colors.white),
)),
const SizedBox(
width: 12,
height: 17,
child: FittedBox(
fit: BoxFit.fill,
child: Icon(
Icons.arrow_drop_down,
color: Colors.white,
),
),
),
],
),
),
);
}
@jacksonw765 Thanks for the example.
The issue has been fixed in version 1.4.2
Thank you very much! Love the package.
Seems to be an issue with the rounding when a custom decorator is provided.
https://user-images.githubusercontent.com/13068724/111939667-42cd8680-8aa3-11eb-83a2-a70b1a3b2aad.mov