I'm trying to display tick (✅) and cross (❌) icons using Flutter. I have this code:
child: SlideAction(
sliderButtonIconPadding: 8,
text: Slidewords,
textStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: (18),
color: Colors.white),
key: key,
submittedIcon: formvalid
? const Icon(Icons.visibility) // tick icon
: const Icon(Icons.visibility_off), // cross icon
onSubmit: () async {
Future.delayed(
Duration(seconds: 1),
() => key.currentState!.reset(),
);
_trySubmitForm();
})
Clearly the Icons.visibility
and Icons.visibility_off
values don't work, but I can't find the right ones in the documentation. Ctrl+F doesn't seem to work to search on that page and it isn't very responsive.
I also tried Icon.tick
, Icon.correct
, and Icon.cross
; none of these give me the result I want.