networkProbeTimeoutMill property

int get networkProbeTimeoutMill

Per-probe reachability timeout (ms).

Can be set via:

  • Code: AppConfigBase.networkProbeTimeoutMillDefault = 5000
  • Build flag: --dart-define dreamic_network_probe_timeout_mill=5000
  • Firebase Remote Config: dreamic_network_probe_timeout_mill

Default: 5000 (bounds 1000-30000). The env/dart-define path is clamped to bounds (NET-022).

Implementation

static int get networkProbeTimeoutMill {
  final bounds = configBounds['dreamic_network_probe_timeout_mill']!;
  const envValue = int.fromEnvironment(
    'dreamic_network_probe_timeout_mill',
    defaultValue: -1,
  );
  if (envValue != -1) {
    return envValue.clamp(bounds.min, bounds.max);
  } else {
    final remoteValue =
        g<RemoteConfigRepoInt>().getInt('dreamic_network_probe_timeout_mill');
    if (remoteValue > 0) {
      return remoteValue.clamp(bounds.min, bounds.max);
    } else {
      return defaultRemoteConfig['dreamic_network_probe_timeout_mill'] as int;
    }
  }
}