使用 ' 是合法的。字段值中的 ' 和 '/'
it is legal to use ' . ' and '/' in field values
我已经在 Firstore 文档中阅读了这个..
它说的是 (field namse),但我不确定它是否也有它们的值。
如果我在字段值而不是名称中写 '/'
和 '.'
会有问题吗
'they require extra escaping' 到底是什么意思
File file = '/appFolrder/testFolder/audioFile.acc'
FirebaseFirestore.instance.collection("users").set({
"myPath":file.path // here i write the path file which contains '/' and '.'
});
如文档所述,此建议适用于字段 names 而不是它们的 values。这也意味着您显示的代码不需要转义 file.path
值中的任何字符。
我已经在 Firstore 文档中阅读了这个..
它说的是 (field namse),但我不确定它是否也有它们的值。
如果我在字段值而不是名称中写 '/'
和 '.'
会有问题吗
'they require extra escaping' 到底是什么意思
File file = '/appFolrder/testFolder/audioFile.acc'
FirebaseFirestore.instance.collection("users").set({
"myPath":file.path // here i write the path file which contains '/' and '.'
});
如文档所述,此建议适用于字段 names 而不是它们的 values。这也意味着您显示的代码不需要转义 file.path
值中的任何字符。