TcpDevice constructor Null safety

TcpDevice(
  1. {PrinterDeviceType? type,
  2. int? port,
  3. String? ip,
  4. String? mac,
  5. String? gateway,
  6. String? netmask}
)

Implementation

factory TcpDevice({
  PrinterDeviceType? type,
  $core.int? port,
  $core.String? ip,
  $core.String? mac,
  $core.String? gateway,
  $core.String? netmask,
}) {
  final _result = create();
  if (type != null) {
    _result.type = type;
  }
  if (port != null) {
    _result.port = port;
  }
  if (ip != null) {
    _result.ip = ip;
  }
  if (mac != null) {
    _result.mac = mac;
  }
  if (gateway != null) {
    _result.gateway = gateway;
  }
  if (netmask != null) {
    _result.netmask = netmask;
  }
  return _result;
}