I'm trying to implement a beautiful CheckBox with a gradient color in a flutter Tell me, is there a way to somehow specify Linear Gradient instead of active color without messing with the Container color?
CheckBox code:
ValueListenableBuilder CheckSex(ValueNotifier<String?> sexNotifier) {
return ValueListenableBuilder(
valueListenable: sexNotifier,
builder: (context, pickedSex, child) {
return Row(
children: ["Мужской", "Женский", "Другой"].map((String sex) {
return Row(
children: [
Text(sex),
Checkbox(
activeColor: Colors.indigo[500],
value: sex == pickedSex,
onChanged: (pick) {
sexNotifier.value = sex;
},
),
],
);
}).toList(),
);
},
);
}
Aucun commentaire:
Enregistrer un commentaire