BluetoothDeviceType.fromUnderlyingValue constructor

const BluetoothDeviceType.fromUnderlyingValue(
  1. int value
)

Implementation

const BluetoothDeviceType.fromUnderlyingValue(int value)
    : this.underlyingValue = ((value >= 0 && value <= 3)
              ? value
              : 0 // Unknown, if not found valid
          ),
      this.stringValue = (value == 0
              ? 'unknown'
              : value == 1
                  ? 'classic'
                  : value == 2
                      ? 'le'
                      : value == 3
                          ? 'dual'
                          : 'unknown' // Unknown, if not found valid
          );