You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/src/models/remote_config/ad_config.dart
+19-10Lines changed: 19 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,19 @@ part 'ad_config.g.dart';
17
17
/// This model is part of the overall [AppConfig] and is used to control
18
18
/// how ads are integrated into the application's feed or other content areas
19
19
/// based on the user's authentication status or subscription level.
20
+
///
21
+
/// **Ad Injection Logic Explained:**
22
+
///
23
+
/// - __`AdFrequency`__: This determines *how often* an ad *can* be injected relative to the number of primary content items. For example, an `adFrequency` of 5 means an ad *could* be placed after every 5 primary items. It sets the overall density of ads in the feed.
24
+
///
25
+
/// - __`AdPlacementInterval`__: This sets a *minimum number of primary items* that must appear *before* the *first* ad is placed. It prevents ads from appearing right at the very beginning of the feed, ensuring the user sees some initial content first.
26
+
///
27
+
/// So, `AdFrequency` controls the spacing of ads *throughout* the feed (after the initial interval), while `AdPlacementInterval` controls where the *very first* ad can appear.
28
+
///
29
+
/// Think of it like this:
30
+
///
31
+
/// - `AdPlacementInterval` = 3: No ads will appear in the first 3 primary items.
32
+
/// - `AdFrequency` = 5: After the first 3 items, an ad *could* appear after item #5, then potentially after item #10, #15, etc.
20
33
/// {@endtemplate}
21
34
@immutable
22
35
@JsonSerializable(
@@ -40,26 +53,22 @@ class AdConfig extends Equatable {
0 commit comments