“static” means a member is available on the class itself instead of on instances of the class. That’s all it means, and it isn’t used for anything else. static modifies *members*.
“final” means single-assignment: a final variable or field *must* have an initializer. Once assigned a value, a final variable’s value cannot be changed. final modifies *variables*.
“const” has a meaning that’s a bit more complex and subtle in Dart. const modifies *values*.
You can use it when creating collections, like const [1, 2, 3], and when constructing objects (instead of new) like const Point(2, 3). Here, const means that the object’s entire deep state can be determined entirely at compile-time and that the object will be frozen and completely immutable.
Kuzu Zangpo la! I am Sonam Dargay. I am a full-time software developer. Apart from 9-5 office works, I am a tech enthusiast, blogger, and dreamer.
I graduated from the College of Science and Technology(CST), affiliated with the Royal University of Bhutan.