ButtonStyle.parse constructor
- int value
Parse a ButtonStyle from an int.
The value
must be a valid button style.
Implementation
factory ButtonStyle.parse(int value) => ButtonStyle.values.firstWhere(
(style) => style.value == value,
orElse: () => throw FormatException('Unknown button style', value),
);