Skip to content

Commit

Permalink
chore: added config for tracking lifecycle (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 authored Nov 6, 2024
1 parent 380a50f commit 6fffd15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/config/customer_io_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,6 +26,7 @@ class CustomerIOConfig {
this.region,
this.logLevel,
this.autoTrackDeviceAttributes,
this.trackApplicationLifecycleEvents,
this.apiHost,
this.cdnHost,
this.flushAt,
Expand All @@ -40,6 +42,7 @@ class CustomerIOConfig {
'region': region?.name,
'logLevel': logLevel?.name,
'autoTrackDeviceAttributes': autoTrackDeviceAttributes,
'trackApplicationLifecycleEvents': trackApplicationLifecycleEvents,
'apiHost': apiHost,
'cdnHost': cdnHost,
'flushAt': flushAt,
Expand Down
2 changes: 2 additions & 0 deletions test/customer_io_config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 6fffd15

Please sign in to comment.