草庐IT

ListView-Adapter

全部标签

flutter - 如何使用 ListView.builder reverse :true 在顶部显示 RefreshIndicator

我正在构建一个简单的消息系统,用户将在其中看到消息列表。我有一个带有reverse:true的ListView.Builder,因为我希望列表在加载消息页面时显示在底部。当他们向下拉一直滚动到顶部时,我希望出现一个刷新指示器,以便他们可以加载以前的消息,就像大多数流行的聊天应用程序一样。然而,由于列表中有reverse:true,他们必须在屏幕底部向上拉以在使用RefreshIndicator时加载以前的消息。有没有办法在使用reverse:true时下拉而不是向上触发RefreshIndicator? 最佳答案 在我看来,你想在L

listview - Flutter ListView 里面的卡片

我想要一个有3张卡片的屏幕。一张卡是CotrolWidget(固定高度的顶部),第二张是MeasurementsList(在Top下面,应该垂直填充),第三张是ChartWidget(在Top下面,在MeasurementsList的右边,应该垂直填充)。returnScaffold(appBar:AppBar(title:newText('Measurements')),body:newContainer(padding:EdgeInsets.all(8.0),decoration:BoxDecoration(color:Colors.black12),child:Column(ma

listview - Flutter ListView 里面的卡片

我想要一个有3张卡片的屏幕。一张卡是CotrolWidget(固定高度的顶部),第二张是MeasurementsList(在Top下面,应该垂直填充),第三张是ChartWidget(在Top下面,在MeasurementsList的右边,应该垂直填充)。returnScaffold(appBar:AppBar(title:newText('Measurements')),body:newContainer(padding:EdgeInsets.all(8.0),decoration:BoxDecoration(color:Colors.black12),child:Column(ma

flutter - 如何在 flutter 中将可扩展 ListView 放入 ScrollView 中?

你好,我正在制作一个flutter应用程序,其中需要在ScrollView中放置可扩展ListView。首先是我的build方法。returnScaffold(appBar:AppBar(backgroundColor:app_color,iconTheme:IconThemeData(color:Colors.white,//changeyourcolorhere)),//debugShowCheckedModeBanner:false,//key:scaffoldKey,backgroundColor:app_color,body:SingleChildScrollView(chi

flutter - 如何在 flutter 中将可扩展 ListView 放入 ScrollView 中?

你好,我正在制作一个flutter应用程序,其中需要在ScrollView中放置可扩展ListView。首先是我的build方法。returnScaffold(appBar:AppBar(backgroundColor:app_color,iconTheme:IconThemeData(color:Colors.white,//changeyourcolorhere)),//debugShowCheckedModeBanner:false,//key:scaffoldKey,backgroundColor:app_color,body:SingleChildScrollView(chi

flutter - 如何修复响应容器内 ListView 的溢出错误

我正在尝试在一个名为ResponsiveContainer的包中使用ListView,每当我使用它时,都会出现一个白屏并覆盖所有容器 最佳答案 尝试将ListViewshrinkWrap属性设置为true 关于flutter-如何修复响应容器内ListView的溢出错误,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/56525426/

flutter - 如何修复响应容器内 ListView 的溢出错误

我正在尝试在一个名为ResponsiveContainer的包中使用ListView,每当我使用它时,都会出现一个白屏并覆盖所有容器 最佳答案 尝试将ListViewshrinkWrap属性设置为true 关于flutter-如何修复响应容器内ListView的溢出错误,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/56525426/

Flutter:如何恢复 ListView 的位置?

当使用Navigator路由主ListView及其详细信息ItemView时,ListView的滚动位置丢失返回堆栈。如何恢复ListView滚动位置?重用ListView小部件也失去了位置-在flutter示例中也看不到重用Widget。Rainer要求的示例代码,Widgetbuild(BuildContextcontext){returnnewMaterialApp(routes:{'/':(BuildContextcontext)=>newMyListView(),},onGenerateRoute:(RouteSettingss){finalListpaths=name.sp

Flutter:如何恢复 ListView 的位置?

当使用Navigator路由主ListView及其详细信息ItemView时,ListView的滚动位置丢失返回堆栈。如何恢复ListView滚动位置?重用ListView小部件也失去了位置-在flutter示例中也看不到重用Widget。Rainer要求的示例代码,Widgetbuild(BuildContextcontext){returnnewMaterialApp(routes:{'/':(BuildContextcontext)=>newMyListView(),},onGenerateRoute:(RouteSettingss){finalListpaths=name.sp

listview - flutter : How to remove space between row in Listview

我只是在做一些flutter的演示,我喜欢这样做,在ListView中,我找不到如何删除行之间的空格我的代码很简单,这个是我返回布局的WidgetWidget_getWidget(BuildContextcontext){returnnewMaterial(child:newContainer(padding:EdgeInsets.only(top:20.0),color:Colors.blueGrey[500],child:newColumn(crossAxisAlignment:CrossAxisAlignment.start,children:[_getHeader(contex