I just updated the Dart Editor (0.5.16_r23799), and the code that was the error / warning was no longer there.
class Fubar { const BAR = 1000000; Fubar(){ } }
Lines starting with const have a marker and this message:
Only static fields can be declared as 'const'
I read this ch02-final-const , there is nothing there.
This post dart-const-static-fields says that const modifier implies static , if we cannot use const without static , we should use final instead? ... but what document / message did I skip? Intend to do this:
Fubar f = new Fubar(); some = f.BAR;
source share