networkPollIntervalConnectedMill property
int
get
networkPollIntervalConnectedMill
Poll cadence (ms) for the reachability probe while the app is connected.
Can be set via:
- Code:
AppConfigBase.networkPollIntervalConnectedMillDefault = 10000 - Build flag:
--dart-define dreamic_network_poll_interval_connected_mill=10000 - Firebase Remote Config:
dreamic_network_poll_interval_connected_mill
Default: 10000 (bounds 2000-120000). The env/dart-define path is clamped to bounds (NET-022).
Implementation
static int get networkPollIntervalConnectedMill {
final bounds = configBounds['dreamic_network_poll_interval_connected_mill']!;
const envValue = int.fromEnvironment(
'dreamic_network_poll_interval_connected_mill',
defaultValue: -1,
);
if (envValue != -1) {
// NET-022: clamp the dart-define path too (the base pattern leaves it
// unclamped) so a build-time typo cannot ship an out-of-range value.
return envValue.clamp(bounds.min, bounds.max);
} else {
final remoteValue =
g<RemoteConfigRepoInt>().getInt('dreamic_network_poll_interval_connected_mill');
if (remoteValue > 0) {
return remoteValue.clamp(bounds.min, bounds.max);
} else {
return defaultRemoteConfig['dreamic_network_poll_interval_connected_mill'] as int;
}
}
}