Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 在Flitter中是否可以在CustomScrollView中使用墨水池_Flutter - Fatal编程技术网

Flutter 在Flitter中是否可以在CustomScrollView中使用墨水池

Flutter 在Flitter中是否可以在CustomScrollView中使用墨水池,flutter,Flutter,当我将InkWell嵌入CustomScrollView时,如下所示: child: SizedBox( height: 500.0, child: CustomScrollView(slivers: <Widget>[ InkWell( onTap: () => {}, child: Padding

当我将InkWell嵌入CustomScrollView时,如下所示:

child: SizedBox(
                height: 500.0,
                child: CustomScrollView(slivers: <Widget>[
                  InkWell(
                    onTap: () => {},
                    child: Padding(
                      padding: const EdgeInsets.only(bottom: 8.0),
                      child: Container(
                        child: Text(
                          item.subName == "" ? "Comment" : item.subName,
                          style: Theme.of(context).textTheme.headline5.copyWith(
                            fontWeight: FontWeight.w600,
                          ),
                        ),
                      ),
                    ),
                  ),

                  SliverPadding(
                    padding: const EdgeInsets.symmetric(vertical: 8.0),
                    sliver: viewService.buildComponent("articlelist"),
                  )
                ]),
              ),
            ),

我应该在CustomScrollView中使用InkWell吗?CustomScrollView只能使用小条组件?我应该怎么做才能解决它?

尝试在
SliveToboxaAdapter
中包装
InkWell
,我已经尝试并解决了这个问题。@moneer alhashim
======== Exception caught by widgets library =======================================================
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4345 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was: 
  CustomScrollView file:///Users/dolphin/Documents/GitHub/cruise-open/lib/src/page/channel/channeldetail_component/view.dart:96:24
====================================================================================================