Create a constant
Put project-wide constants under the top-levelconstants/ directory. Files are discovered
recursively, and one file may contain more than one declaration.
constants/ are organizational. They do not change where project-wide constants are
available.
Use a constant
Reference a constant with@const("name"):
Scalar values
Constants support strings, signed integers, booleans, finite floating-point numbers, exact decimals, andnull. Integers use a portable signed 64-bit range. NaN and positive or negative
infinity are rejected.
Use type decimal with a quoted value when decimal precision must be exact:
type and value fails compilation.
Naming rules
Public constant names must be unique among public constants and cannot begin with_. Enum,
constant, and macro names use separate namespaces, so an enum and a constant may share a name.
More constant features
Collections and Rendering
Define lists, sets, and objects, then choose value-list or native-array rendering.
Model-Private Values
Keep a constant inside one model when no other resource should use it.

