createDataStreamWithConfig method Null safety

Future<int?> createDataStreamWithConfig(
  1. DataStreamConfig config
)

Creates a data stream.

Since v3.3.1.

Each user can create up to five data streams in a single channel.

This method does not support data reliability. If the receiver receives a data packet five seconds or more after it was sent, the SDK directly discards the data.

Parameter config The configurations for the data stream: DataStreamConfig.

Returns

  • The stream ID, if this method call succeeds.
  • Error code, if this method call fails.

Implementation

@override
Future<int?> createDataStreamWithConfig(DataStreamConfig config) {
  return _invokeMethod('createDataStream', {
    'config': config.toJson(),
  });
}