arrays - 从 Firestore 中的数组更新特定索引
问题描述
我想更新我的数组的特定索引,但我明白了
“ type '_InternalLinkedHashMap<String, dynamic>' 不是类型 'String' 的子类型”。
有谁知道我为什么会收到这个错误?
Checkbox(
value: widget.raffles[index]
["${auth.currentUser.uid}" + "link"],
onChanged: (val) {
setState(() {
sneakers.doc(widget.doc).set(
{
widget.raffles[index]: [
{
"${auth.currentUser.uid}" + "link": true,
}
]
},
SetOptions(merge: true),
);
});
},
),
解决方案
推荐阅读
- objective-c - 如何用可可区分侧键和滚轮键?
- vba - 从 vba 单词表字段中提取值时,我得到像特殊字符这样的框。如何从列表中删除它们?
- javascript - 使用 React JS 的 Facebook 身份验证 Firebase - 提供者错误
- javascript - Material ui 工具提示在移动设备上不起作用
- javascript - 如何在 reactjs 中获取 get 响应的 mime 类型?
- shell - 如何在 shell 脚本中使用 sed 在 JSON 中获取第一个“id”?
- python - boto3 与 Amazon DynamoDB 的交互
- sql - VB.NET 中的 SQL 选择查询
- sharepoint - 从共享点获取所有文档的列表
- commercetools - 添加自定义对象订阅 - Commercetool