小编bib*_*ama的帖子

如何滚动嵌套在 Flutter 中的 Listview

当我使用两个嵌套的 Listviews 和 ListView.builder 时,它仍然会滚动,但是具有 shirnkSwap 属性的子 Listview.builder 无法再滚动,但是我不想在小部件容器中使用 height 属性,因为它非常难看。

颤振 1.9.4 SDK

// 我的主屏幕

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color(0xFFEEF0F2),
      appBar: AppBar(
        backgroundColor: Color(0xFF396DF0),
        elevation: 0,
        leading: LeadinguttonIcon(),
        title: Text('TheGoal'),
        actions: <Widget>[ActionIconButton()],
      ),
      body:
          ListView(children: <Widget>[TopHomeScreenBody(), BottomHomeScreen()]),
    );
  }
}```

**//  TopHomeScreenBody**

```class TopHomeScreenBody extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ClipPath(
      clipper: BodyClipper(),
      child: Container(
        color: Color(0xFF396DF0),
        padding: EdgeInsets.only(top: 10, right: 22, left: 22, bottom: 30),
        height: 250,
        width: double.infinity,
        child: Container( …
Run Code Online (Sandbox Code Playgroud)

listview scrollable dart flutter

2
推荐指数
1
解决办法
2597
查看次数

标签 统计

dart ×1

flutter ×1

listview ×1

scrollable ×1