ios - Flutter SelectableText 在iOS上没有全选选项
问题描述
我正在使用SelectableText.rich()
小部件来允许用户复制显示的文本。在 Android 上,工具栏中的默认选项是复制和全选 - 我也可以自定义它。在 iOS 上,默认选项似乎只有 Copy 并且设置ToolbarOptions
不会改变它(只有当我将 copy 设置为 false 时,它才会消失)。我的目标是在 Android 和 iOS 上显示 Copy 和 Select All 选项。我错过了什么还是某种错误?
SelectableText.rich(
TextSpan(children: [
TextSpan(
text: "Name\n",
style:
TextStyles.getDetailViewLabelStyle(context),
),
TextSpan(
text: projectName,
style:
TextStyles.getDetailViewContentStyle(context),
)
]),
toolbarOptions:
const ToolbarOptions(copy: true, selectAll: true),
),
解决方案
推荐阅读
- google-apps-script - 如何修复谷歌表格中多行、动态、相关下拉列表中的“正在加载...”错误?
- mongodb - 如何在 mongodb 中设置新字段的默认值?
- javascript - How to make Callback run after Promise?
- python - 当我将鼠标悬停在pygame上时,为什么我的按钮不会改变颜色?
- javascript - 将单个 JSON 重构为嵌套数组
- html - CSS布局两列,第二列缩进
- python - 如何在启动 Django 项目时集成 python 脚本以运行
- javascript - 使用 jquery 创建表并选择选项。选项更改时如何隐藏以前的表值?
- python - 修复python中的keyerror
- dns - 如何更改子域名并使用旧名称重定向