I just upgraded my Dart Editor (0.5.16_r23799), and code that was bug/warning free, is not anymore.
class Fubar {
const BAR = 1000000;
Fubar(){
}
}
Lines beginning by const
have marker and this message :
Only static fields can be declared as 'const'
I read this ch02-final-const, nothing there.
This post dart-const-static-fields says that const modifier implies static
, if we can't use const
without static
, we should use final
instead ?... but what doc/post I missed ? Intend to do this :
Fubar f = new Fubar();
some = f.BAR;