我在 Flutter 中搜索勾号 (✅) 和十字 (❌) 图标,但我似乎没有从开发文档中找到它们。
https://api.flutter.dev/flutter/material/Icons-class.html
网页真的很慢,我也无法正常使用Ctrl+F。我尝试了“Icon.tick”、“Icon. Correct”和“Icon.cross”,但找不到合适的可以使用。
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();
})
对于十字,使用
Icons.close
,对于勾号,使用 Icons.check
。