create static method

KameleoonClient create(
  1. String siteCode, [
  2. KameleoonConfiguration? config
])

Create or return the instance of KameleoonClient depending of the siteCode

Implementation

static KameleoonClient create(String siteCode, [KameleoonConfiguration? config]) {
  if (!_clients.containsKey(siteCode)) {
    final instance = KameleoonClientImpl(siteCode, config ?? KameleoonConfiguration(), _channel);
    _channel.setMethodCallHandler(_nativeMethodCallHandler);
    _clients[siteCode] = instance;
  }
  return _clients[siteCode]!;
}