BluetoothBondState.fromUnderlyingValue constructor

const BluetoothBondState.fromUnderlyingValue(
  1. int value
)

Implementation

const BluetoothBondState.fromUnderlyingValue(int value)
    : this.underlyingValue = ((value >= 10 && value <= 12)
              ? value
              : 0 // Unknown, if not found valid
          ),
      this.stringValue = (value == 10
              ? 'none'
              : value == 11
                  ? 'bonding'
                  : value == 12
                      ? 'bonded'
                      : 'unknown' // Unknown, if not found valid
          );