草庐IT

definition-lists

全部标签

list - 将列表传递给 QR 生成器

我是Flutter编程的新手,我正在尝试创建一个披萨应用程序。首先你制作披萨,选择配料,然后你会得到一份订单list。该列表和qr生成器也有效,但它们来自单独的教程,我在连接它们时遇到问题。我似乎无法将订单列表传递给生成器。import'package:flutter/material.dart';import'package:qr_flutter/qr_flutter.dart';import'package:flutter/services.dart';import'dart:async';import'dart:typed_data';import'dart:ui';import

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

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 - 类型 List<dynamic> 不是类型 'Map<String, dynamic>' 的子类型

我正在尝试从API获取数据。我收到错误消息“类型列表不是map的子类型。我是新手,不明白我在哪里犯了错误。这是我的fetchpost函数:FuturefetchPost()async{finalresponse=awaithttp.get('http://starlord.hackerearth.com/beercraft');if(response.statusCode==200){returnPost.fromJson(json.decode(response.body));}else{throwException('Failedtoloadpost');}}在我的主屏幕中,我使用