gpt4 book ai didi

Flutter FilterChip 头像精选款式

转载 作者:IT老高 更新时间:2023-10-28 12:36:00 30 4
gpt4 key购买 nike

我正在使用 FilterChipCircleAvatar 作为头像,但所选状态有一个令人讨厌的矩形,我似乎找不到任何引用。如何删除它?

代码:

child: FilterChip(
avatar: CircleAvatar(
backgroundColor: category.color
),
label: Text(category.name),
selected: badCategoryIds.contains(category.id),
onSelected: (bool value) {
if (value) {
badCategoryIds.add(category.id);
}
else {
badCategoryIds.remove(category.id);
}
categoryChoiceCallback(badCategoryIds);
},
)

结果:

enter image description here

我希望它如何显示(取自 material.io 文档):

enter image description here

FilterChip documentation .

最佳答案

您也可以尝试将此解决方案调整为适用于您的 Chip Circle 的 Circle Image

new Container(
width: 190.0,
height: 190.0,
decoration: new BoxDecoration(
shape: BoxShape.circle,
image: new DecorationImage(
fit: BoxFit.fill,
image: new NetworkImage(
"https://i.imgur.com/BoN9kdC.png")
)
)),

来自这篇中型帖子 https://medium.com/@boldijar.paul/circle-image-view-in-flutter-965963c46cf5

关于Flutter FilterChip 头像精选款式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53929540/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com