首页 > 解决方案 > 墨水瓶在堆栈内不起作用->定位

问题描述

我目前正在使用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)),
                                          ),),),],),],),),],),),],)            
                            


标签: flutter

解决方案


从您的代码中删除 IgnorePointer 小部件。它应该工作。


推荐阅读