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