fromValue static method

UIButtonType fromValue(
  1. int value
)

Implementation

static UIButtonType fromValue(int value) => switch (value) {
  0 => UIButtonTypeCustom,
  1 => UIButtonTypeSystem,
  2 => UIButtonTypeDetailDisclosure,
  3 => UIButtonTypeInfoLight,
  4 => UIButtonTypeInfoDark,
  5 => UIButtonTypeContactAdd,
  6 => UIButtonTypePlain,
  7 => UIButtonTypeClose,
  _ => throw ArgumentError('Unknown value for UIButtonType: $value'),
};