Is there a "constexpr" from C++ equivalent in Dart?

Viewed 63

I have a lot of nearly identical UI code, with differences only in constants.

The easiest way to improve this would be to write utility functions which would be called with compile-time constants and yield the same result.

Even a C/C++ macro equivalent would be sufficient in some cases, but constexpr functions would make complex code much more readable.

Is this possible in Dart?

0 Answers
Related