SocketConfig constructor

SocketConfig({
  1. bool persistStream = false,
  2. required String ws,
  3. bool listen = true,
  4. String persistanceKey = 'K-es',
})

Creates a SocketConfig instance with the specified configuration parameters.

The WebSocket URL (ws) is required. persistStream defaults to false, and listen defaults to true.

If persistStream is true, a warning message is logged indicating that this feature is still under development.

Implementation

SocketConfig({
  this.persistStream = false,
  required this.ws,
  this.listen = true,
  this.persistanceKey = 'K-es',
}) {
  if (persistStream) {
    log('[SocketConfig]: persistStream is still under development; please use with caution.');
  }
}