【发布时间】:2020-01-02 21:14:53
【问题描述】:
当从一个页面滑动到另一个飞溅出现在页面的最一侧时,我有一个 TabBarview。 我不希望飞溅亮点出现在两侧。
虽然 tabbarview 具有物理特性,并且当设置为 bouncingscrollphysics() 时,此形状不应出现,就像列表视图中发生的那样,但没有任何改变。
尝试了另一种解决方案:我用主题包装了 tabbarview,并将突出显示颜色和初始颜色更改为 colors.transparent,但这也不起作用。这是我的 TabBarview 的代码。 这是用户界面,以及它的外观。
Theme(
data: new ThemeData(
splashColor: Colors.transparent,
highlightColor: Colors.transparent),
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _controller,
children: model.types.map((String type) {
List<Subscription> subssOfThisType =
model.historySubscription.where((Subscription sub) {
return sub.package.name == type;
}).toList();
final cards = subssOfThisType.map(
(s) {
return HistoryCard(
sub: s,
);
},
).toList();
return ListView(
physics: BouncingScrollPhysics(),
padding:
EdgeInsets.symmetric(horizontal: 14, vertical: 8),
children: cards ?? Container(),
);
}).toList(),
),
)
【问题讨论】:
标签: flutter splash-screen tabbar