use method

ChatClientBuilder use(
  1. ChatClientFactory clientFactory
)

Adds a middleware factory to the pipeline.

This corresponds to the single-parameter Use overload in .NET.

Implementation

ChatClientBuilder use(ChatClientFactory clientFactory) {
  ArgumentError.checkNotNull(clientFactory, 'clientFactory');
  return useWithServices((innerClient, _) => clientFactory(innerClient));
}