是什么区别const和final关键字飞镖?
I have initial data which works fine.
var data = {field1: FieldValue.increment(1)};
Run Code Online (Sandbox Code Playgroud)
And it is also fine when I add another field to the data.
data.addAll({field2: FieldValue.increment(1)});
Run Code Online (Sandbox Code Playgroud)
But if I set the value to 0, it won't allow me to.
data.addAll({field3: 0});
Run Code Online (Sandbox Code Playgroud)
It will give an error of: The element type 'int' can't be assigned to the map value type 'FieldValue'.
I tried doing this but still, have the same issue.
data[field3] = 0;
Run Code Online (Sandbox Code Playgroud)
How will I set the field3 …