Got an error for following code

```
Cannot invoke a non-'const' constructor where a const expression is expected.  
Try using a constructor or factory that is 'const'.     
static const MyClass darkerText = MyClass(param);

```

Understood that using `static` in this instance might be inappropriate. Just wanted to look if there is any possible way to do so.

```dart
class MyClass {
  final int total;
  MyClass(total);
}

class Test {
  static int param = 10;
  static const MyClass darkerText = MyClass(param);
}

main() {
  new Test();
}

```