我需要一个应用屏幕,其中有一个图标网格(可单击),横幅和项目列表视图

问题描述 投票:0回答:1

APP screen

像上面的示例一样,我提到有什么方法可以实现它,因为底部导航栏是固定的,因此在单击图标页面时应加载并滚动而不影响导航栏?

android user-interface flutter dart flutter-layout
1个回答
0
投票

您可以将SingleChildScrollView作为父项,并在内部列表和网格中使用rinkeWrap = true,

SingleChildScrollView(
   child: Column(
    children: <Widget>[

     GridView(
     physics: NeverScrollableScrollPhysics(),
     shrinkWrap: true, // use it
     ),

     CarouselSlider(...),

     ListView.builder(
      shrinkWrap: true, // use it
      scrollDirection: Axis.horizontal,// this will make your list horizontal scrollable
    )
   ],
  ),
));

对于CarouselSlider,您可以使用this library

© www.soinside.com 2019 - 2024. All rights reserved.