Home > other >  Flutter firebase firestore update value if contain "." => fail
Flutter firebase firestore update value if contain "." => fail

Time:07-20

enter image description here

print(hoursRanges[selectedHourRangeIndex!]);
//output: 09.00 - 11.00

it separates the dots when I want to update the value

enter image description here

CodePudding user response:

Try:

await FirebaseFirestore.instance
.collection("staff")
.doc(data.email)
.collection("archive)
.doc(inputs.date.substring(0.10))
.update({
"${hoursRanges[selectedRangeIndex!]}": true});

CodePudding user response:

enter image description here

its my firestore document structure I solved it by changing it like this 09.00 - 11.00 => 09:00 - 11:00

  • Related