code_builder
code_builder copied to clipboard
Impossible to force literalNum(10.0) to be a double
If I use literalNum(10.0), the result will be 10. But I need to make sure the result is a double, i.e. has at least one decimal digit.
Is there any way to achieve that?
If not, maybe something like this: Expression literalDouble(double value) => LiteralExpression._(value.toString()); could be added to literal.dart? If I understand the docs for double.toString() correctly, that should ensure that at least one decimal digit is included in the output.
Thank you!