flutter - 溢出属性不会剪辑文本小部件中的内容
问题描述
有一个小部件
Row(mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: const Icon(
Icons.warning,
color: Colors.deepOrange,
),
),
const Text(
'Failed to fetch repos for',
style: TextStyle(color: Colors.deepOrange),
),
Text(
store.user,
style: const TextStyle(color: Colors.deepOrange, fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis, // here it is
)
])
由于某种原因,该overflow
属性不起作用。
解决方案
推荐阅读
- javascript - 使用 v-for 显示一列中的偶数索引和另一列中的奇数索引
- reactjs - 路由器链接没有加载组件
- python - Trying to plot outliers using DBSCAN
- file - wget & curl 输出“没有这样的文件或目录”
- akka - akka 和最多一次消息语义的好处
- sql - 使用 VBA 在 oracle 查询中创建日期变量
- tabs - 无法在新 Chromium EDGE 中独立于 Tab 到 Tab 设置 IME 键盘输入方法
- assembly - 当寄存器操作数与指令的大小后缀不匹配时
- sql-server - SSIS 数据流无法获取连接,即使它在控制流的早期进行了
- javascript - JS beforeunload 在 window.addEventListener('beforeunload', (evt){}) 上不起作用