Samsung constructor Null safety

Samsung(
  1. dynamic config
)

Constructor

Implementation

Samsung(config) {
  debug('config $config');
  _appName = config['appName'] ?? 'robodomo-samsung';
  _appName_base64 = base64.encode(utf8.encode(_appName));
  _tvHostname = config['device'];
  _macAddress = config['macAddress'];
  _powerKey = config['powerKey'] ?? 'KEY_POWER';
  _timeout = config['timeout'] ?? 4000;
  _controlUrl =
      'ws://$_tvHostname:8001/api/v2/channels/samsung.remote.control?name=$_appName_base64';
}