notificationValuePropReminderMaxAskCount property
Maximum number of value-proposition reminders shown to a user who
previously declined the in-app value-proposition sheet. Returns null
when unlimited (cooldown is the sole gate).
Layered resolution mirrors notificationGoToSettingsMaxAskCount —
see its doc-comment for the layer-specific RC value <= 0 = unset
convention and how it relates (does NOT contradict) the inline helper
API contract from shouldShowValuePropReminder.
The programmatic default is stored in defaultRemoteConfig as a non-null
int: "unlimited" is the notificationMaxAskCountUnlimited sentinel
(-1) mapped back to null here; every other stored value — including
0 — passes through unchanged. As in notificationGoToSettingsMaxAskCount,
the env-layer -1 ("unset, fall through", never returned) and the stored
programmatic-default -1 ("unlimited" sentinel) are the same literal with
different layer-specific meanings — do not conflate them.
Default: null (unlimited), stored as the notificationMaxAskCountUnlimited sentinel.
Implementation
static int? get notificationValuePropReminderMaxAskCount {
const envValue = int.fromEnvironment(
'notificationValuePropReminderMaxAskCount',
defaultValue: -1,
);
if (envValue != -1) {
return envValue;
}
final remoteValue =
g<RemoteConfigRepoInt>().getInt('notificationValuePropReminderMaxAskCount');
if (remoteValue > 0) {
final bounds = configBounds['notificationValuePropReminderMaxAskCount']!;
return remoteValue.clamp(bounds.min, bounds.max);
}
// RC value <= 0 (including 0 and negatives) → unset, fall through to the
// programmatic default. Only the sentinel maps to null (unlimited); every
// other value (incl. 0) is returned as-is.
final d = defaultRemoteConfig['notificationValuePropReminderMaxAskCount'] as int;
return d == notificationMaxAskCountUnlimited ? null : d;
}