Mohammed Hamdan
Mohammed Hamdan

Reputation: 1355

it is legal to use ' . ' and '/' in field values

i have read this in the docs Firstore docs ..

enter image description here

it says about (field namse) , but i am not sure if it also with their values too .

does it problem if i write '/' and '.' in the field values and not names

and what does 'they require extra escaping' means exactly

File file = '/appFolrder/testFolder/audioFile.acc'
FirebaseFirestore.instance.collection("users").set({
"myPath":file.path  // here i write the path file which contains '/' and '.'        
});

Upvotes: 1

Views: 24

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599491

As the documentation says, this recommendation applies to field names and not to their values. That also means the code you showed does not need to escape any characters in the file.path value.

Upvotes: 2

Related Questions