From 89e3bb791807e3227d2cfc7e47d4bdfd49afe7ae Mon Sep 17 00:00:00 2001 From: Shahroz Khan Date: Wed, 6 Nov 2024 22:52:53 +0500 Subject: [PATCH 1/2] added lifecycle config --- lib/config/customer_io_config.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/config/customer_io_config.dart b/lib/config/customer_io_config.dart index 55819f0..c65d512 100644 --- a/lib/config/customer_io_config.dart +++ b/lib/config/customer_io_config.dart @@ -11,6 +11,7 @@ class CustomerIOConfig { final String? migrationSiteId; final Region? region; final CioLogLevel? logLevel; + final bool? trackApplicationLifecycleEvents; final bool? autoTrackDeviceAttributes; final String? apiHost; final String? cdnHost; @@ -25,6 +26,7 @@ class CustomerIOConfig { this.region, this.logLevel, this.autoTrackDeviceAttributes, + this.trackApplicationLifecycleEvents, this.apiHost, this.cdnHost, this.flushAt, @@ -40,6 +42,7 @@ class CustomerIOConfig { 'region': region?.name, 'logLevel': logLevel?.name, 'autoTrackDeviceAttributes': autoTrackDeviceAttributes, + 'trackApplicationLifecycleEvents': trackApplicationLifecycleEvents, 'apiHost': apiHost, 'cdnHost': cdnHost, 'flushAt': flushAt, From 026f337ba8337d237eee053f0a95e8cbd91d6956 Mon Sep 17 00:00:00 2001 From: Shahroz Khan Date: Thu, 7 Nov 2024 02:17:10 +0500 Subject: [PATCH 2/2] fixed test --- test/customer_io_config_test.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/customer_io_config_test.dart b/test/customer_io_config_test.dart index 3a1e2c1..acd9009 100644 --- a/test/customer_io_config_test.dart +++ b/test/customer_io_config_test.dart @@ -82,6 +82,7 @@ void main() { region: Region.eu, logLevel: CioLogLevel.info, autoTrackDeviceAttributes: false, + trackApplicationLifecycleEvents: false, apiHost: 'https://api.example.com', cdnHost: 'https://cdn.example.com', flushAt: 25, @@ -96,6 +97,7 @@ void main() { 'region': 'eu', 'logLevel': 'info', 'autoTrackDeviceAttributes': false, + 'trackApplicationLifecycleEvents': false, 'apiHost': 'https://api.example.com', 'cdnHost': 'https://cdn.example.com', 'flushAt': 25,