草庐IT

dart-isolates

全部标签

dart - 如何在 flutter 中返回流中的对象列表

我有以下firestore结构和一种从数据库获取用户提要的方法。我需要像这样链接我的流首先是来自User/FeedIDs集合的所有feedID然后对于每个feedID,获取feed详细信息的文档并返回到它们的列表。我可以找到解决这个问题的方法,因为toList()不工作或者我做错了什么。//UserCollection-User-RandomDocumentID-Feed-FeedIDasDocumentID-field1-field2..//FeedCollection-Feed-RandomDocumentID-field1-field2..//Methodinmyreposito

dart - 如何在Flutter中自定义SliverAppBar的flexibleSpace属性?

我不想在SliverAppBar的flexibleSpace属性中使用FlexibleSpaceBar,而是想使用自定义小部件树,当展开时,但在滚动时,我想显示自定义文本,而不是小部件树。我已经创建了一个自定义小部件树,它将分配给flexibleSpace属性,但我不知道如何在滚动时显示自定义文本并隐藏小部件树。SliverAppBar(expandedHeight:180.0,backgroundColor:constColor(0xFF9e0118),iconTheme:IconThemeData(color:Colors.white),floating:true,pinned:t

dart - 如何在Flutter中自定义SliverAppBar的flexibleSpace属性?

我不想在SliverAppBar的flexibleSpace属性中使用FlexibleSpaceBar,而是想使用自定义小部件树,当展开时,但在滚动时,我想显示自定义文本,而不是小部件树。我已经创建了一个自定义小部件树,它将分配给flexibleSpace属性,但我不知道如何在滚动时显示自定义文本并隐藏小部件树。SliverAppBar(expandedHeight:180.0,backgroundColor:constColor(0xFF9e0118),iconTheme:IconThemeData(color:Colors.white),floating:true,pinned:t

dart - 在 flutter 中获取 Firestore 文档的 documentID?

Flutter如何获取Firestore中文档生成的documentID?我知道我可以像这样访问文档的各个字段:returnFirestore().collection(postPath).data.documents.forEach((response){nodeList.add(Post(//response.data().id-howdoigettheUID(example:-LUoDIu4wlVksjbbfIWE)?response['content'],response['date'],response['flair'],response['location'],respon

dart - 在 flutter 中获取 Firestore 文档的 documentID?

Flutter如何获取Firestore中文档生成的documentID?我知道我可以像这样访问文档的各个字段:returnFirestore().collection(postPath).data.documents.forEach((response){nodeList.add(Post(//response.data().id-howdoigettheUID(example:-LUoDIu4wlVksjbbfIWE)?response['content'],response['date'],response['flair'],response['location'],respon

dart - Flutter - 如何重启或重绘当前屏幕 Widget

我正在使用抽屉导航,我在其中设计了一个屏幕名称作为PostProperty屏幕,其中实现了多个文本表单字段、图像上传,我想要的是当用户单击提交/添加按钮时,然后是当前屏幕应该重绘小部件或清除所有表单字段,以便用户可以提交/添加另一个,请指导我,如何实现这一点。WidgetBuildCode@overrideWidgetbuild(BuildContextcontext){returnnewScaffold(key:scaffoldKey,resizeToAvoidBottomPadding:false,backgroundColor:Colors.white,appBar:showAp

dart - Flutter - 如何重启或重绘当前屏幕 Widget

我正在使用抽屉导航,我在其中设计了一个屏幕名称作为PostProperty屏幕,其中实现了多个文本表单字段、图像上传,我想要的是当用户单击提交/添加按钮时,然后是当前屏幕应该重绘小部件或清除所有表单字段,以便用户可以提交/添加另一个,请指导我,如何实现这一点。WidgetBuildCode@overrideWidgetbuild(BuildContextcontext){returnnewScaffold(key:scaffoldKey,resizeToAvoidBottomPadding:false,backgroundColor:Colors.white,appBar:showAp

dart - Row RenderFlex 右侧溢出 76 像素

下面是我的代码,我总是在正确的尺寸上溢出一些像素。我也在玩Expanded和Fixable小部件以及行和列的mainAxisSize。看代码:WidgetproductDisplayListView(ListlistOfProduct,intindex){returnContainer(margin:EdgeInsets.all(7),child:Container(child:Card(elevation:4,child:Container(padding:EdgeInsets.all(6),child:Row(mainAxisSize:MainAxisSize.min,mainAx

dart - Row RenderFlex 右侧溢出 76 像素

下面是我的代码,我总是在正确的尺寸上溢出一些像素。我也在玩Expanded和Fixable小部件以及行和列的mainAxisSize。看代码:WidgetproductDisplayListView(ListlistOfProduct,intindex){returnContainer(margin:EdgeInsets.all(7),child:Container(child:Card(elevation:4,child:Container(padding:EdgeInsets.all(6),child:Row(mainAxisSize:MainAxisSize.min,mainAx

dart - Flutter:仅使用联系人选择器返回联系人号码

我正在使用以下插件“contact_picker0.0.2”从我的地址簿中选择一个联系人并返回一个电话号码。问题是它像这样返回联系人姓名、号码和号码类型(工作、家庭)亚历山德罗:+27000000000(工作)我已经使用这段代码成功摆脱了大部分问题onPressed:()async{Contactcontact=await_contactPicker.selectContact();setState((){_contact=contact;print(_contact.toString().replaceAll("+27","").replaceAll("","").replaceAl