Open
Description
The code snippet below doesn't work,
enum Gaps {
one(6);
final SizedBox vBox, hBox, box;
final double size;
const Gaps(this.size)
: box = const SizedBox(width: size, height: size),
hBox = const SizedBox(width: size),
vBox = const SizedBox(height: size);
}
It doesn't recognize size
as constant. Am I missing something here because as far as I understand it is only possible to use generative enums with const
values.