草庐IT

list_container

全部标签

http - 未处理的异常 : type 'List<String>' is not a subtype of type 'String' in type cast

我正在尝试在我的api中发布一个字符串列表。以下是我的网络代码classDashboardFeeCountApiProviderimplementsDashboardFeeCountSource{@overrideFuturegetDashboardFees(Stringtype,StringuserId,StringyearId,ListfeeCategoryId)async{finalresponse=awaithttp.post(DASHBOARD_FEE_URL,body:{"type":"1","userid":userId,"yearId":yearId,"fee_cat_

http - 未处理的异常 : type 'List<String>' is not a subtype of type 'String' in type cast

我正在尝试在我的api中发布一个字符串列表。以下是我的网络代码classDashboardFeeCountApiProviderimplementsDashboardFeeCountSource{@overrideFuturegetDashboardFees(Stringtype,StringuserId,StringyearId,ListfeeCategoryId)async{finalresponse=awaithttp.post(DASHBOARD_FEE_URL,body:{"type":"1","userid":userId,"yearId":yearId,"fee_cat_

android - flutter : how i get data from firestore in List<String>?

大家好,我正在尝试从我的firestore数据库中获取数据到List为此,我创建变量ListlistCour;我使用该指令从firestore获取数据Firestore.instance.collection('MATH').document(doc.documentID).collection("cours").snapshots().listen((cour)=>cour.documents.forEach((doc){listCour.add(doc.documentID);}));但是列表没有数据!! 最佳答案 尝试使用do

android - flutter : how i get data from firestore in List<String>?

大家好,我正在尝试从我的firestore数据库中获取数据到List为此,我创建变量ListlistCour;我使用该指令从firestore获取数据Firestore.instance.collection('MATH').document(doc.documentID).collection("cours").snapshots().listen((cour)=>cour.documents.forEach((doc){listCour.add(doc.documentID);}));但是列表没有数据!! 最佳答案 尝试使用do

dart - Flutter _TypeError(类型 'List<dynamic>' 不是类型 'Map<String, dynamic>' 的子类型)

我是Flutter的新手,遇到了类型错误。我正在尝试使用json自动序列化。在做了一些调整之后,这里是它的样子这是我尝试从api获取数据的方式FuturegetMyProduct()async{finalres=awaithttp.get('url');finaldata=json.decode(res.body);BaseResponsereq=newBaseResponse.fromJson(data);returnreq;}我的BaseResponse类如下所示import'package:dynamicapp/model/model.dart';import'package:j

dart - Flutter _TypeError(类型 'List<dynamic>' 不是类型 'Map<String, dynamic>' 的子类型)

我是Flutter的新手,遇到了类型错误。我正在尝试使用json自动序列化。在做了一些调整之后,这里是它的样子这是我尝试从api获取数据的方式FuturegetMyProduct()async{finalres=awaithttp.get('url');finaldata=json.decode(res.body);BaseResponsereq=newBaseResponse.fromJson(data);returnreq;}我的BaseResponse类如下所示import'package:dynamicapp/model/model.dart';import'package:j

docker进入容器时报错 Error response from daemon: Container xxx is restarting, wait until the container is

使用dockerrun命令运行容器,再进入容器时报错运行容器命令dockerrun--restart=always--namemongo-v/data/mongo:/data/db-p27017:27017-dmongo--auth进入容器命令dockerexec-itmongobash错误信息Errorresponsefromdaemon:Container90831dd80b32a1502d9535c874ceec899b5fd70c883481195b4f36cd29be47b0isrestarting,waituntilthecontainerisrunning[root@Tracy~

list - 如何为列表中的单个项目(而不是整个列表)编写 setter?

我的模型中有一个包含bool列表的类。在我的UI中,我想通过setter在列表中的单个项目中设置bool状态(这样我也可以保存它)。我无法弄清楚语法(或者这是否是一件有效的事情)。///ThisisOKsetnotificationDismissed(boolnotificationDismissed){_notificationDismissed=notificationDismissed;saveParameterBoolean(_notificationDismissedKey,_notificationDismissed);}boolgetnotificationDismiss

list - 如何为列表中的单个项目(而不是整个列表)编写 setter?

我的模型中有一个包含bool列表的类。在我的UI中,我想通过setter在列表中的单个项目中设置bool状态(这样我也可以保存它)。我无法弄清楚语法(或者这是否是一件有效的事情)。///ThisisOKsetnotificationDismissed(boolnotificationDismissed){_notificationDismissed=notificationDismissed;saveParameterBoolean(_notificationDismissedKey,_notificationDismissed);}boolgetnotificationDismiss

flutter : Text floating on the container margin or padding

我正在尝试制作一个ListView,其中的项目由里面一行4个展开的容器每个容器里面都有一个中心部件和一个文本关键是我想为每个项目做一个底边距但当它需要更多空间时,文本会浮在上面这是我的代码首先是ListViewWidget_buildList(Listlist,BuildContextcontext){returnExpanded(child:ListView.builder(itemBuilder:(BuildContextcontext,intindex){Stringid=list[index]["default_code"].toString();Stringname=list