在扑朔迷离中,什么是什么选中(✅)和cross/x(❌)图标?
我正在尝试使用颤动显示tick(✅)和交叉(❌)图标。我有此代码:
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.visibility
和 icons.visibility_off
值不起作用,但是我找不到正确的在文档中。 ctrl + f 似乎在该页面上搜索不起作用,而且响应速度不是。
我还尝试了 icon.tick
, icon.correct
和 icon.cross.cross
;这些都没有给我我想要的结果。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于十字架,请使用
icons.close
,对于tick,icons.check
。For a cross, use
Icons.close
, and for a tick,Icons.check
.您要寻找的图标是
icons.check_check_box_box
和
icons.close.close.close
。要查看图标,没有周围的填充框,请使用图标。检查
。如果很难在扑波文档中搜索图标,则可以使用材料符号和图标来自Google字体的页面。
找到图标后,您可以单击它,侧边栏将出现在右侧。转到“ Android”选项卡,图标代码将与
Icons
类中的图标相同。例如,如果您单击“复选框”图标:此图标的代码为“ check_box”
“ https://i.sstatic.net/xrjhl.png” alt = “ 该页面中有一些图标,但在 belity_symbols_icons_icons package。现在,您可以使用图标
符号
:The icons you're looking for are
Icons.check_box
andIcons.close
. For check icon without the filled box around it, useIcons.check
.If it's hard to search for icons in the Flutter docs, you can use the Material Symbols and Icons page from Google Fonts.
After finding the icon, you can click on it and a sidebar will appear on the right side. Go to the "Android" tab, the icon code will be the same as the one from the
Icons
class. For example, here's what you'll get if you click on the "Check Box" icon:The code for this icon is "check_box", so you can use it in Flutter like this:
In case there are icons you find in that page but not available in the Icons class, you can use the material_symbols_icons package. Now instead of using
Icons
, you can useSymbols
: