Hi I am trying to use ColorFilter when recommend is only true
GestureDetector(
onTap: () {
setState(() {
recommend = !recommend;
if (!recommend) {
both = false;
male = false;
female = false;
}
});
},
child: ColorFiltered(
colorFilter: recommend
? ColorFilter.mode(Colors.amber, BlendMode.saturation)
: ColorFilter.mode(Colors.white, BlendMode.saturation),)
How can i use CololrFilter when the recommend is only true ??
CodePudding user response:
try this:
colorFilter: recommend
? ColorFilter.mode(Colors.amber, BlendMode.saturation)
: ColorFilter.mode(Colors.transparent, BlendMode.saturation),)