SerialOptions constructor

SerialOptions({
  1. required int baudRate,
  2. int? dataBits,
  3. int? stopBits,
  4. ParityType? parity,
  5. int? bufferSize,
  6. FlowControlType? flowControl,
})

Implementation

factory SerialOptions(
        {required int baudRate,
        int? dataBits,
        int? stopBits,
        ParityType? parity,
        int? bufferSize,
        FlowControlType? flowControl}) =>
    SerialOptions._(
        baudRate: baudRate,
        dataBits: dataBits ?? 8,
        stopBits: stopBits ?? 1,
        parity: parity?.value ?? ParityType.none.value,
        bufferSize: bufferSize ?? 255,
        flowControl: flowControl?.value ?? FlowControlType.none.value);