Dan*_*eny 61
正如评论中所提到的,NeverScrollableScrollPhysics类将执行此操作:
NeverScrollableScrollPhysics类
滚动物理,不允许用户滚动.
Ank*_*dia 45
在ListView小部件中,使用
physics: const NeverScrollableScrollPhysics()
Run Code Online (Sandbox Code Playgroud)
Fer*_*lus 13
启用和禁用滚动视图的条件语句。
physics: chckSwitch ? const NeverScrollableScrollPhysics() : const AlwaysScrollableScrollPhysics(),
Run Code Online (Sandbox Code Playgroud)
小智 5
为我工作
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
...
Run Code Online (Sandbox Code Playgroud)
小智 5
NestedScrollView 怎么样?
bottomNavigationBar: _buildBottomAppBar(),
body: Container(
child: NestedScrollView(
physics: NeverScrollableScrollPhysics(),
controller: _scrollViewController,
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
buildSliverAppBar(innerBoxIsScrolled),
];
},
body: _buildBody(context),
),
),
);
Run Code Online (Sandbox Code Playgroud)
它对我有用
| 归档时间: |
|
| 查看次数: |
14173 次 |
| 最近记录: |