如何解决失去焦点时颤动卡片背景发生变化
我有这张卡:
Card(
elevation: 5,color: Colors.white,shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),),child: Container(
height: 0.17 * SizeConfig.screenHeight,decoration: Boxdecoration(
image: decorationImage(
image: Assetimage("assets/images/grey_card.png"),fit: BoxFit.fill,child: Row(
children: [
SizedBox(
width: 0.05 * SizeConfig.screenWidth + 16,CircleAvatar(
foregroundColor: Colors.transparent,backgroundColor: Colors.transparent,radius: 0.08 * SizeConfig.screenWidth,backgroundImage: Assetimage("assets/images/logo_with_background.png")),Expanded(
child: Center(
child: Radio(
value: index,groupValue: test,focusColor: Colors.transparent,activeColor: Colors.black,onChanged: (value) {
setState(() {
test = index;
});
},],);
当一张卡片失去焦点时(当我选择另一张卡片的单选按钮时)所有卡片的背景,但当前和以前选择的卡片会变成某种紫色:
在点击任何东西之前,一切看起来都很好。单击第一个单选按钮后:
点击第二个单选按钮后:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。