getConstantValue method

dynamic getConstantValue()

Returns the constant value of this literal. Throws StateError if literal is not constant, check before usage with isConstant().

Implementation

dynamic getConstantValue() {
  throw StateError('Literal $this is not constant.');
}