We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
enum_array_literal_check
Checks for array literals declared enum in class and struct declarations. These lead to large amounts of run-time memory allocation.
enum
The runtime will allocate a copy of this array literal every time it is used.
struct SomeStruct { enum VALUES = [1, 2, 3, 4, 5]; }
Use static immutable instead.
static immutable
struct SomeStruct { static immutable VALUES = [1, 2, 3, 4, 5]; }