fromValue static method

UIButtonRole fromValue(
  1. int value
)

Implementation

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