You could theoretically modify Dart so that the const modifier introduces static . This is a valid proposal and has been actively discussed.
There are two reasons why we prefer to use explicit static :
- This makes access to these variables (like any other static) more understandable.
- We can use an instance of
const for a different value. Currently the const instance fields are strictly equivalent to the final fields. However, they do not have to be. For example, you can modify the Dart specification to allow access to the fields of a const instance as part of a constant expression. (Currently, access to the fields on the right side of const fields is not allowed.)
source share