KineticSdkConfig constructor

KineticSdkConfig({
  1. required int index,
  2. required String endpoint,
  3. required String environment,
  4. Commitment? commitment,
  5. Map<String, String>? headers,
  6. Logger? logger,
})

Implementation

KineticSdkConfig(
    {required this.index,
    required this.endpoint,
    required this.environment,
    this.commitment,
    this.headers,
    this.logger}) {
  Map<String, String>? defaultHeaders = {
    'kinetic-environment': environment,
    'kinetic-index': index.toString(),
    'kinetic-user-agent': "$name/$version",
  };
  headers = headers != null ? {...headers!, ...defaultHeaders} : defaultHeaders;
}