我不喜欢这样,但这是唯一对我有效的解决方案.我必须编辑非项目文件(PopupMenuItem
班)
return InkWell(
onTap: widget.enabled ? handleTap : null,
child: Container(
height: widget.height,
padding: const EdgeInsets.symmetric(horizontal: _kMenuHorizontalPadding), // setting this to 0 worked
child: item,
),
);
PS:我希望有人能想出更好的答案.我很乐意接受它.谢谢:)