小编Div*_*vya的帖子

Flutter RadioListTile - 如何减少单选图标和标题之间的空间?

如何减少单选图标和标题之间的间距?

我尝试使用内容填充属性。但却无法缩小他们之间的差距。有什么办法可以实现这一点吗?

在此输入图像描述

示例代码:

RadioListTile(
  contentPadding: const EdgeInsets.only(top: 12, bottom: 12, left: 5),
  title: Text(
    "Tap Payment",
    style: GoogleFonts.poppins(
      color: Color(0xff000000),
      fontSize: 16,
      fontWeight: FontWeight.w500,
      letterSpacing: 0.5,
    ),
  ),
  value: values[0],
  groupValue: currentValue,
  onChanged: (value) {
    setState(() {
      currentValue = value.toString();
    });
  },
  tileColor: (currentValue == values[0])
      ? Color(0xffececec)
      : Colors.transparent,
),
Run Code Online (Sandbox Code Playgroud)

radio-button dart flutter

2
推荐指数
1
解决办法
611
查看次数

标签 统计

dart ×1

flutter ×1

radio-button ×1