android - 如何在颤动中给出复选框渐变?
问题描述
有没有办法在颤动中实现一个带有渐变的复选框?我尝试使用 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,),
),
推荐阅读
- python - 如何通过 Selenium 从对象中获取文本?(但实际上不是一张桌子)
- python - 没有名为 influxdb 的模块
- llvm-lit - Lit-llvm - 获取当前目录(不是完整路径)
- excel - 对指定列但可变行的整个数据集进行自定义排序
- c# - 在 MediatR 命令/查询模式中传递会话数据
- react-native - 如何从堆栈导航器访问 navigation.toggleDrawer()?
- javascript - 在没有 AJAX 的情况下使用“WooCommerce 结帐时更改数量”插件
- ios - PHPickerViewController,双击图像调用didFinishPicking两次
- mysql - 石墨烯 Django 的 MySQL 复制
- sql - 如何在 Postgres 中将 3 个表组合在一起?