From 1548203f5705aa91b678023259c9dfee5d89e10b Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:01:06 +0100 Subject: [PATCH 01/11] refactor: remove demo enums from production code - Remove AdPlatformType.demo from ad_platform_type.dart - Remove AnalyticsProvider.demo from analytics_provider.dart --- lib/src/enums/ad_platform_type.dart | 9 --------- lib/src/enums/analytics_provider.dart | 4 ---- 2 files changed, 13 deletions(-) diff --git a/lib/src/enums/ad_platform_type.dart b/lib/src/enums/ad_platform_type.dart index 96af9cbe..e624d9b2 100644 --- a/lib/src/enums/ad_platform_type.dart +++ b/lib/src/enums/ad_platform_type.dart @@ -4,13 +4,4 @@ enum AdPlatformType { /// Google AdMob platform. admob, - - /// Represents a placeholder ad platform for demonstration purposes. - /// - /// When this type is selected, it indicates that ads should be handled - /// by a demo-specific ad provider, which displays placeholder ads , - /// without initializing external ad SDKs. This is - /// primarily used in the `demo` environment to avoid actual ad network - /// calls and `MissingPluginException` on unsupported platforms (e.g., web). - demo, } diff --git a/lib/src/enums/analytics_provider.dart b/lib/src/enums/analytics_provider.dart index 54f105bb..ae4ad4df 100644 --- a/lib/src/enums/analytics_provider.dart +++ b/lib/src/enums/analytics_provider.dart @@ -15,8 +15,4 @@ enum AnalyticsProvider { /// Mixpanel Analytics. @JsonValue('mixpanel') mixpanel, - - /// A demo provider that logs events to the console for development. - @JsonValue('demo') - demo, } From ce61254f17d2241c7e2e7bb221c6f1f1eef78e50 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:02:04 +0100 Subject: [PATCH 02/11] refactor(remote_configs): remove unused ad platform identifiers - Remove unnecessary AdPlatformType.demo configuration - Remove unused blank line in AnalyticsConfig --- lib/src/fixtures/remote_configs.dart | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/src/fixtures/remote_configs.dart b/lib/src/fixtures/remote_configs.dart index beb03106..8813d03c 100644 --- a/lib/src/fixtures/remote_configs.dart +++ b/lib/src/fixtures/remote_configs.dart @@ -101,7 +101,6 @@ final remoteConfigsFixturesData = [ analytics: AnalyticsConfig( enabled: true, activeProvider: AnalyticsProvider.firebase, - /// If an event is absent from this set, it is considered enabled by default disabledEvents: {AnalyticsEvent.contentReadingTime}, // If an event is absent from this map, it is logged at a 1.0 rate (100%). @@ -116,11 +115,6 @@ final remoteConfigsFixturesData = [ bannerAdId: 'ca-app-pub-3940256099942544/6300978111', interstitialAdId: 'ca-app-pub-3940256099942544/1033173712', ), - AdPlatformType.demo: AdPlatformIdentifiers( - nativeAdId: '_', - bannerAdId: '_', - interstitialAdId: '_', - ), }, feedAdConfiguration: FeedAdConfiguration( enabled: true, From 1a8006f9278392d8529958214170596de3c78749 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:02:17 +0100 Subject: [PATCH 03/11] test: remove demo enums from tests - Remove AdPlatformType.demo from ad_platform_type tests - Remove AnalyticsProvider.demo from analytics_provider tests --- test/src/enums/ad_platform_type_test.dart | 3 --- test/src/enums/analytics_provider_test.dart | 2 -- 2 files changed, 5 deletions(-) diff --git a/test/src/enums/ad_platform_type_test.dart b/test/src/enums/ad_platform_type_test.dart index eacb4737..b9d0f31a 100644 --- a/test/src/enums/ad_platform_type_test.dart +++ b/test/src/enums/ad_platform_type_test.dart @@ -5,17 +5,14 @@ void main() { group('AdPlatformType', () { test('has correct string values', () { expect(AdPlatformType.admob.name, 'admob'); - expect(AdPlatformType.demo.name, 'demo'); }); test('can be created from string values', () { expect(AdPlatformType.values.byName('admob'), AdPlatformType.admob); - expect(AdPlatformType.values.byName('demo'), AdPlatformType.demo); }); test('has correct toString representation', () { expect(AdPlatformType.admob.toString(), 'AdPlatformType.admob'); - expect(AdPlatformType.demo.toString(), 'AdPlatformType.demo'); }); }); } diff --git a/test/src/enums/analytics_provider_test.dart b/test/src/enums/analytics_provider_test.dart index dc634f3a..7085ba64 100644 --- a/test/src/enums/analytics_provider_test.dart +++ b/test/src/enums/analytics_provider_test.dart @@ -9,7 +9,6 @@ void main() { containsAll([ AnalyticsProvider.firebase, AnalyticsProvider.mixpanel, - AnalyticsProvider.demo, ]), ); }); @@ -17,7 +16,6 @@ void main() { test('has correct string names', () { expect(AnalyticsProvider.firebase.name, 'firebase'); expect(AnalyticsProvider.mixpanel.name, 'mixpanel'); - expect(AnalyticsProvider.demo.name, 'demo'); }); test('can be created from string names', () { From 80e19fa47afe12cc559cb378d14c0977bf66b4a3 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:02:51 +0100 Subject: [PATCH 04/11] refactor(models): remove deprecated enum values - Remove AdPlatformType.demo from ad_config.g.dart - Remove AnalyticsProvider.demo from analytics_config.g.dart --- lib/src/models/config/ad_config.g.dart | 5 +---- lib/src/models/config/analytics_config.g.dart | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/src/models/config/ad_config.g.dart b/lib/src/models/config/ad_config.g.dart index 415da410..27ab2643 100644 --- a/lib/src/models/config/ad_config.g.dart +++ b/lib/src/models/config/ad_config.g.dart @@ -45,7 +45,4 @@ Map _$AdConfigToJson(AdConfig instance) => { 'navigationAdConfiguration': instance.navigationAdConfiguration.toJson(), }; -const _$AdPlatformTypeEnumMap = { - AdPlatformType.admob: 'admob', - AdPlatformType.demo: 'demo', -}; +const _$AdPlatformTypeEnumMap = {AdPlatformType.admob: 'admob'}; diff --git a/lib/src/models/config/analytics_config.g.dart b/lib/src/models/config/analytics_config.g.dart index a0a2be88..fb5a0ef7 100644 --- a/lib/src/models/config/analytics_config.g.dart +++ b/lib/src/models/config/analytics_config.g.dart @@ -40,5 +40,4 @@ Map _$AnalyticsConfigToJson( const _$AnalyticsProviderEnumMap = { AnalyticsProvider.firebase: 'firebase', AnalyticsProvider.mixpanel: 'mixpanel', - AnalyticsProvider.demo: 'demo', }; From 90bd6dd085afdb0702d110b1c377cf2e7693d052 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:03:01 +0100 Subject: [PATCH 05/11] test(analytics): update ad_clicked_payload tests - Replace AdPlatformType.demo with AdPlatformType.admob in tests - Modify AdType in non-equality test case --- .../analytics/payloads/ad_clicked_payload_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/src/models/analytics/payloads/ad_clicked_payload_test.dart b/test/src/models/analytics/payloads/ad_clicked_payload_test.dart index 9debc139..c0d20d6a 100644 --- a/test/src/models/analytics/payloads/ad_clicked_payload_test.dart +++ b/test/src/models/analytics/payloads/ad_clicked_payload_test.dart @@ -23,12 +23,12 @@ void main() { group('Equatable', () { test('should equate two identical instances', () { const instance1 = AdClickedPayload( - adProvider: AdPlatformType.demo, + adProvider: AdPlatformType.admob, adType: AdType.banner, adPlacement: 'bottom', ); const instance2 = AdClickedPayload( - adProvider: AdPlatformType.demo, + adProvider: AdPlatformType.admob, adType: AdType.banner, adPlacement: 'bottom', ); @@ -38,8 +38,8 @@ void main() { test('should not equate instances with different properties', () { const instance1 = payload; const instance2 = AdClickedPayload( - adProvider: AdPlatformType.demo, - adType: AdType.native, + adProvider: AdPlatformType.admob, + adType: AdType.banner, adPlacement: 'feed', ); expect(instance1, isNot(equals(instance2))); From ea8256466514986ff314958ea57750a40fb40e61 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:03:25 +0100 Subject: [PATCH 06/11] test(analytics): update ad_impression_payload tests - Replace AdPlatformType.demo with AdPlatformType.admob in tests - Modify AdType in non-equality test case from native to banner --- .../analytics/payloads/ad_impression_payload_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/src/models/analytics/payloads/ad_impression_payload_test.dart b/test/src/models/analytics/payloads/ad_impression_payload_test.dart index d402ea7c..d09bd31a 100644 --- a/test/src/models/analytics/payloads/ad_impression_payload_test.dart +++ b/test/src/models/analytics/payloads/ad_impression_payload_test.dart @@ -23,12 +23,12 @@ void main() { group('Equatable', () { test('should equate two identical instances', () { const instance1 = AdImpressionPayload( - adProvider: AdPlatformType.demo, + adProvider: AdPlatformType.admob, adType: AdType.banner, adPlacement: 'bottom', ); const instance2 = AdImpressionPayload( - adProvider: AdPlatformType.demo, + adProvider: AdPlatformType.admob, adType: AdType.banner, adPlacement: 'bottom', ); @@ -38,8 +38,8 @@ void main() { test('should not equate instances with different properties', () { const instance1 = payload; const instance2 = AdImpressionPayload( - adProvider: AdPlatformType.demo, - adType: AdType.native, + adProvider: AdPlatformType.admob, + adType: AdType.banner, adPlacement: 'feed', ); expect(instance1, isNot(equals(instance2))); From be0a82349c1e0e4d75f885aa73cebd845d474351 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:03:44 +0100 Subject: [PATCH 07/11] test(analytics): update ad load failed payload tests - Change AdPlatformType from demo to admob in test cases - Ensure equatability tests reflect consistent ad provider type --- .../analytics/payloads/ad_load_failed_payload_test.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/src/models/analytics/payloads/ad_load_failed_payload_test.dart b/test/src/models/analytics/payloads/ad_load_failed_payload_test.dart index d527a193..bdb6cd0b 100644 --- a/test/src/models/analytics/payloads/ad_load_failed_payload_test.dart +++ b/test/src/models/analytics/payloads/ad_load_failed_payload_test.dart @@ -23,12 +23,12 @@ void main() { group('Equatable', () { test('should equate two identical instances', () { const instance1 = AdLoadFailedPayload( - adProvider: AdPlatformType.demo, + adProvider: AdPlatformType.admob, adType: AdType.banner, errorCode: 404, ); const instance2 = AdLoadFailedPayload( - adProvider: AdPlatformType.demo, + adProvider: AdPlatformType.admob, adType: AdType.banner, errorCode: 404, ); @@ -38,7 +38,7 @@ void main() { test('should not equate instances with different properties', () { const instance1 = payload; const instance2 = AdLoadFailedPayload( - adProvider: AdPlatformType.demo, + adProvider: AdPlatformType.admob, adType: AdType.interstitial, errorCode: 2, ); From 7c6c7164077ebb92623522118a559722568bf88b Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:03:55 +0100 Subject: [PATCH 08/11] test(analytics_config): remove unused test code - Remove tests for equality of instances with different properties - Delete unused variables and improve test clarity --- test/src/models/config/analytics_config_test.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/src/models/config/analytics_config_test.dart b/test/src/models/config/analytics_config_test.dart index 1f9c40e3..40c1c25c 100644 --- a/test/src/models/config/analytics_config_test.dart +++ b/test/src/models/config/analytics_config_test.dart @@ -55,11 +55,7 @@ void main() { test('should not equate instances with different properties', () { final config1 = analyticsConfigFixture.copyWith(); final config2 = analyticsConfigFixture.copyWith(enabled: false); - final config3 = analyticsConfigFixture.copyWith( - activeProvider: AnalyticsProvider.demo, - ); expect(config1, isNot(equals(config2))); - expect(config1, isNot(equals(config3))); }); test('props list should contain all relevant fields', () { From 8c48f45932008ffd961236d6738e8a064b6cc4eb Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:04:08 +0100 Subject: [PATCH 09/11] test(remote-config): remove activeProvider assignment in test - Remove unnecessary assignment of activeProvider in remote config test - This change simplifies the test case and removes dependency on a specific provider --- test/src/models/config/remote_config_test.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/test/src/models/config/remote_config_test.dart b/test/src/models/config/remote_config_test.dart index f6fd63e4..67430f97 100644 --- a/test/src/models/config/remote_config_test.dart +++ b/test/src/models/config/remote_config_test.dart @@ -54,7 +54,6 @@ void main() { final newFeatures = remoteConfigFixture.features.copyWith( analytics: remoteConfigFixture.features.analytics.copyWith( enabled: false, - activeProvider: AnalyticsProvider.demo, ), ); From 42cf2aebe48b026cfe66d9afa42313f13751d714 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:04:52 +0100 Subject: [PATCH 10/11] refactor(enums): remove demo enums from production and test code - Remove demo enums from production code - Remove unused ad platform identifiers from remote configs - Remove demo enums from tests --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02663a10..b021af9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to Semantic Versioning. ## [Unreleased] +### Changed +- **BREAKING refactor(enums)**: remove demo enums from production code +- **refactor**(remote_configs): remove unused ad platform identifiers +- **fix(tests)**: remove demo enums from tests + + ## [1.6.0] - 2025-12-31 ### Added From a665bc3b1e90f2429398dbf40d319971dfc03391 Mon Sep 17 00:00:00 2001 From: fulleni Date: Fri, 2 Jan 2026 08:05:14 +0100 Subject: [PATCH 11/11] style: format --- lib/src/fixtures/remote_configs.dart | 1 + test/src/enums/analytics_provider_test.dart | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/src/fixtures/remote_configs.dart b/lib/src/fixtures/remote_configs.dart index 8813d03c..45b2706c 100644 --- a/lib/src/fixtures/remote_configs.dart +++ b/lib/src/fixtures/remote_configs.dart @@ -101,6 +101,7 @@ final remoteConfigsFixturesData = [ analytics: AnalyticsConfig( enabled: true, activeProvider: AnalyticsProvider.firebase, + /// If an event is absent from this set, it is considered enabled by default disabledEvents: {AnalyticsEvent.contentReadingTime}, // If an event is absent from this map, it is logged at a 1.0 rate (100%). diff --git a/test/src/enums/analytics_provider_test.dart b/test/src/enums/analytics_provider_test.dart index 7085ba64..dc49ee79 100644 --- a/test/src/enums/analytics_provider_test.dart +++ b/test/src/enums/analytics_provider_test.dart @@ -6,10 +6,7 @@ void main() { test('has correct values', () { expect( AnalyticsProvider.values, - containsAll([ - AnalyticsProvider.firebase, - AnalyticsProvider.mixpanel, - ]), + containsAll([AnalyticsProvider.firebase, AnalyticsProvider.mixpanel]), ); });