flutter - 墨水瓶在堆栈内不起作用->定位
问题描述
我目前正在使用flutter开发桌面应用程序(linux),我注意到当我将inkwell放入定位的小部件时它不起作用或者我在某处犯了错误
//Home page
//there are many elements in the tree, but especially this part //that doesn't work. the expanded widgat has a row parent
Stack(
clipBehavior: Clip.none,
children: [
Positioned(
top: 69,
left: 20,
child: Row(
children: [
Container(
width: 958,height: 400,
child: Column(
children: [
Row(
children: [
Container(
width: 200,
height: 200,
padding:
const EdgeInsets.only(top: 50),
child: InkWell(
onTap: () {
print('click');
},
child: IgnorePointer(
child: Center(
child: Text(
"voir plus (96 autres contacts)",
style:
bTextInfoItemBottomSearchCard)),
),),),],),],),),],),),],)
解决方案
从您的代码中删除 IgnorePointer 小部件。它应该工作。
推荐阅读
- angular - 值更改为 false 时未通知观察者
- reactjs - EmberJS 中的 Vuex/Redux 等价物是什么?
- php - 如何从子数组中获取所有文件名并计数?
- flutter - 颤振异步调用的最佳实践?
- angular - 如何在 Angular6 中渲染 @ContentChildren 主体
- timer - 如何在 Outsystem 中创建计时器?
- batch-file - Windows - 列出文件夹中的所有非空目录并写入文件
- sql - CSV 导入到 SQL 问题 - 文本分隔符问题
- c++ - Qt Creator + CMake + Clang
- c++ - 从 C++ 中读取文本文件时,如何检查字符串格式是否有效?