繁体   English   中英

如何摆脱这个自定义小部件周围的额外填充? (飞镖)

[英]How do I get rid of the extra padding around this custom widget? (flutter-dart)

我创建了一个自定义小部件,它只是一排按钮。 但是,它在我想删除的按钮周围添加了填充,事情是我不知道如何。

这是它的样子。

在此处输入图像描述

这是单个按钮的代码。

@override
Widget build(BuildContext context) {
  return MaterialButton(
    padding: EdgeInsets.zero,
    materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
    onPressed: onPressed ?? null,
    color: color,
    textColor: iconColor,
    child: SvgPicture.asset(iconLocation,
        width: height / 2, height: height / 2, color: iconColor),
    shape: CircleBorder(),
    height: height,
  );
}
 contentPadding: EdgeInsets.only(left: 0.0, right: 0.0),

使它成为 0.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM