getPortType method

dynamic getPortType(
  1. EpsonEPOSPortType enumData, {
  2. bool returnInt = false,
})

Implementation

dynamic getPortType(EpsonEPOSPortType enumData, {bool returnInt = false}) {
  switch (enumData) {
    case EpsonEPOSPortType.TCP:
      return returnInt ? 1 : 'TCP';
    case EpsonEPOSPortType.BLUETOOTH:
      return returnInt ? 2 : 'BT';
    case EpsonEPOSPortType.USB:
      return returnInt ? 3 : 'USB';
    default:
      return returnInt ? 0 : 'ALL';
  }
}