PhoneType.fromRawValue constructor

PhoneType.fromRawValue(
  1. int value
)

Implementation

factory PhoneType.fromRawValue(int value) {
  switch (value) {
    case 0:
      return PhoneType.unknown;
    case 1:
      return PhoneType.work;
    case 2:
      return PhoneType.home;
    case 3:
      return PhoneType.fax;
    case 4:
      return PhoneType.mobile;
    default:
      throw ArgumentError.value(value, 'value', 'Invalid raw value.');
  }
}