fromValue static method
Implementation
static UIButtonRole fromValue(int value) => switch (value) {
0 => UIButtonRoleNormal,
1 => UIButtonRolePrimary,
2 => UIButtonRoleCancel,
3 => UIButtonRoleDestructive,
_ => throw ArgumentError('Unknown value for UIButtonRole: $value'),
};