草庐IT

ListView-Adapter

全部标签

listview - 下拉 ListView

我有一个工作正常的DropdownMenu,但我需要一个ListView,但我无法转换它。DropdownMenu如下所示://CreatetheListofdevicestobeshowninDropdownMenuList>_getDeviceItems(){List>items=[];if(_devicesList.isEmpty){items.add(DropdownMenuItem(child:Text(allTranslations.text(StringConstant.none)),));}else{_devicesList.forEach((device){items

listview - 下拉 ListView

我有一个工作正常的DropdownMenu,但我需要一个ListView,但我无法转换它。DropdownMenu如下所示://CreatetheListofdevicestobeshowninDropdownMenuList>_getDeviceItems(){List>items=[];if(_devicesList.isEmpty){items.add(DropdownMenuItem(child:Text(allTranslations.text(StringConstant.none)),));}else{_devicesList.forEach((device){items

flutter - 如何将 List 的每一项与 ListView 构建器的每一项进行比较?

我有两个名为list1和list2的列表。list1用于显示使用ListView.builder的学生列表ListView.builder(itemCount:litems.length,itemBuilder:(BuildContextctxt,intindex){returnText(list1[index]);})list1包含所有学生的名字现在list2只包含少数学生的姓名。如果list2中存在学生姓名,我需要更改学生姓名的颜色。如何将list2的每一项与ListView.builder的每一项进行比较list2与list1不同。list2只包含几个学生的名字。

flutter - 如何将 List 的每一项与 ListView 构建器的每一项进行比较?

我有两个名为list1和list2的列表。list1用于显示使用ListView.builder的学生列表ListView.builder(itemCount:litems.length,itemBuilder:(BuildContextctxt,intindex){returnText(list1[index]);})list1包含所有学生的名字现在list2只包含少数学生的姓名。如果list2中存在学生姓名,我需要更改学生姓名的颜色。如何将list2的每一项与ListView.builder的每一项进行比较list2与list1不同。list2只包含几个学生的名字。

firebase - Firestore 异步加载和填充 ListView flutter

您好,我正在尝试从firestore获取数据并填充ListView,以下是我的代码,但是由于我的异步调用未完成,我遇到了异常我如何才能等待该异步调用完成并填充我的ListView我的代码如下:import'dart:async';import'package:cloud_firestore/cloud_firestore.dart';import'package:test_flutter/pkg/Feed.dart';classFeedLoader{finalCollectionReference_colReference;FeedLoader(Firestore_firestore)

firebase - Firestore 异步加载和填充 ListView flutter

您好,我正在尝试从firestore获取数据并填充ListView,以下是我的代码,但是由于我的异步调用未完成,我遇到了异常我如何才能等待该异步调用完成并填充我的ListView我的代码如下:import'dart:async';import'package:cloud_firestore/cloud_firestore.dart';import'package:test_flutter/pkg/Feed.dart';classFeedLoader{finalCollectionReference_colReference;FeedLoader(Firestore_firestore)

flutter - 如何在 ListView.builder 中使用 RadioListTile?

我正在尝试制作一个可选择的ListView。我选择了RadioListTile,但它不需要与Radios一起使用,我会很高兴ListTile的背景颜色变化>点击项目。所以在我当前的代码中,我有RadioListTiles,但它不会在点击时检查,我认为它可以检查多个,因为它在ListView.builder,但我不知道,因为我是Flutter的新手,而且它不起作用。代码如下:ListView.builder(scrollDirection:Axis.vertical,itemCount:items.length,itemBuilder:(context,index){returnRadi

flutter - 如何在 ListView.builder 中使用 RadioListTile?

我正在尝试制作一个可选择的ListView。我选择了RadioListTile,但它不需要与Radios一起使用,我会很高兴ListTile的背景颜色变化>点击项目。所以在我当前的代码中,我有RadioListTiles,但它不会在点击时检查,我认为它可以检查多个,因为它在ListView.builder,但我不知道,因为我是Flutter的新手,而且它不起作用。代码如下:ListView.builder(scrollDirection:Axis.vertical,itemCount:items.length,itemBuilder:(context,index){returnRadi

listview - Flutter:ListView.builder 中的 ListView.builder

我想实现一个可滚动(垂直)且其中包含元素的屏幕。所以我把它放在listview.builder上。问题是,其中一个元素是另一个水平滚动的listview.builder。当我实现它时,horizo​​ntal.builder中的元素没有出现。这是我目前所拥有的:@overrideWidgetbuild(BuildContextcontext){returnListView.builder(itemCount:3,itemBuilder:(context,position){if(position==0){returnCard(shape:RoundedRectangleBorder(b

listview - Flutter:ListView.builder 中的 ListView.builder

我想实现一个可滚动(垂直)且其中包含元素的屏幕。所以我把它放在listview.builder上。问题是,其中一个元素是另一个水平滚动的listview.builder。当我实现它时,horizo​​ntal.builder中的元素没有出现。这是我目前所拥有的:@overrideWidgetbuild(BuildContextcontext){returnListView.builder(itemCount:3,itemBuilder:(context,position){if(position==0){returnCard(shape:RoundedRectangleBorder(b