我有一个 flutter 电子商务应用程序,其中有一个 orderDetails 页面,我想使用 flutter pdf 包将整个页面转换为 pdf,因为数据是从 FirebaseFirestore 检索的,这样会更方便。有什么办法可以实现这一目标吗?
sub:我想使用这个库将整个颤动屏幕转换为pdf
在电子商务 flutter 应用程序项目中,我使用shortInfo
项目集合的字段作为每个产品的唯一 ID。当按下“添加到购物车”时,它会将其保存到在我的集合中shortInfo
调用的数组字段,我正在使用WhereIn来查询该数组,但是当我有超过10个产品时,我的应用程序崩溃了。我在这里做错了什么?userCartList
users
这是我的 Firestore 结构:
这是我正在执行的查询的片段:
StreamBuilder<QuerySnapshot>(
stream: EcommerceApp.firestore
.collection("items")
.where("shortInfo", whereIn: EcommerceApp.sharedPreferences.getStringList(EcommerceApp.userCartList))
.snapshots()
)
Run Code Online (Sandbox Code Playgroud)