From f7a65f05d8465761d16985c3791ba435621b018d Mon Sep 17 00:00:00 2001 From: Rehan Date: Thu, 7 Nov 2024 15:10:47 +0500 Subject: [PATCH] keys fix --- apps/amiapp_flutter/lib/src/customer_io.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/amiapp_flutter/lib/src/customer_io.dart b/apps/amiapp_flutter/lib/src/customer_io.dart index 313854a..fb1b2d5 100644 --- a/apps/amiapp_flutter/lib/src/customer_io.dart +++ b/apps/amiapp_flutter/lib/src/customer_io.dart @@ -55,19 +55,19 @@ class CustomerIOSDK extends ChangeNotifier { } final InAppConfig? inAppConfig; - if (_sdkConfig?.migrationSiteId != null) { - inAppConfig = InAppConfig(siteId: _sdkConfig!.migrationSiteId ?? ''); + final migrationSiteId = _sdkConfig?.migrationSiteId; + if (migrationSiteId != null) { + inAppConfig = InAppConfig(siteId: migrationSiteId); } else { inAppConfig = null; } return CustomerIO.initialize( config: CustomerIOConfig( - cdpApiKey: '${_sdkConfig?.cdnHost}:${_sdkConfig?.cdpApiKey}', - migrationSiteId: _sdkConfig?.migrationSiteId, + cdpApiKey: _sdkConfig?.cdpApiKey ?? 'INVALID', + migrationSiteId: migrationSiteId, region: Region.us, logLevel: logLevel, - autoTrackDeviceAttributes: - _sdkConfig?.autoTrackDeviceAttributes, + autoTrackDeviceAttributes: _sdkConfig?.autoTrackDeviceAttributes, apiHost: _sdkConfig?.apiHost, cdnHost: _sdkConfig?.cdnHost, flushAt: _sdkConfig?.flushAt,