newInstance static method

Future<String?> newInstance({
  1. required String clientId,
  2. required ClientConfigurationType type,
  3. bool? httpRedirectCaching,
  4. bool? keepAliveMeasurement,
  5. bool? secureTransmission,
  6. Map<String, String>? persistentLabels,
  7. Map<String, String>? startLabels,
  8. Map<String, String?>? other,
})

Implementation

static Future<String?> newInstance(
    {required String clientId,
    required ClientConfigurationType type,
    bool? httpRedirectCaching,
    bool? keepAliveMeasurement,
    bool? secureTransmission,
    Map<String, String>? persistentLabels,
    Map<String, String>? startLabels,
    Map<String, String?>? other}) async {
  Map<String, dynamic> values = <String, dynamic>{
    Args.type: type.name,
    'clientId': clientId,
    'httpRedirectCaching': httpRedirectCaching,
    "keepAliveMeasurement": keepAliveMeasurement,
    "secureTransmission": secureTransmission,
    "persistentLabels": persistentLabels,
    "startLabels": startLabels
  };
  if (other != null) {
    values.addAll(other);
  }
  return await _methodChannel.invokeMethod<String?>('newInstance', values);
}