createClient abstract method

BaseClient createClient([
  1. String? name = Options.defaultName
])

Creates and configures a http.BaseClient instance using the configuration that corresponds to the logical name specified by name.

Each call to createClient is guaranteed to return a new http.BaseClient instance. It is generally not necessary to dispose of the BaseClient as the HttpClientFactory tracks and disposes resources used by the BaseClient.

If no name is provided, the BaseClient will be configured using the default configuration.

Implementation

http.BaseClient createClient([String? name = Options.defaultName]);