what is the inverse of set?

Issue

I was trying to jump around documents on line, and i see the set function for when i do set("myString", "hello"); or set("myMap.test", "world"); but i was curious as to what the inverse is? I figured unset but when looking online at the Properties sections of Polymer 1.0 Dart code, i wasnt quite getting the information I wanted.

What is the inverse of set, to remove an attribute? My particular use case is to remove a key from a map, unset("myMap.testKey");

Since set is defined in Polymer_base.dart, i thought it would rest somewhere within that file, but i did not see any “unset” or similar.

Solution

I don’t know if it works but I would remove the element from the map and then call

notifyPath('myMap.testKey, null);

If the values was null already then this probably won’t work.

Answered By – Günter Zöchbauer

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *