【发布时间】:2021-05-11 12:05:37
【问题描述】:
有没有办法在颤动中实现带有渐变的复选框?我尝试使用 Checkbox 类但无法实现线性渐变?我该怎么办?
【问题讨论】:
有没有办法在颤动中实现带有渐变的复选框?我尝试使用 Checkbox 类但无法实现线性渐变?我该怎么办?
【问题讨论】:
你可以用容器包裹它并像这样改变高度和宽度:
Container(height: 19,
width: 19,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(10, 3),
colors: <Color>[
Colors.white,
Colors.grey,
],
)
),
child: Checkbox(value: false,),
),
【讨论】: