loadGlobalEnableFromPreferences static method

void loadGlobalEnableFromPreferences()

Load global enable value from preferences (fallback when remote config missing)

Implementation

static void loadGlobalEnableFromPreferences() {
  if (!PreferencesManager.isInitialized()) return;

  try {
    final savedValue = PreferencesManager.getBoolean(globalEnableKey, true);
    _cachedConfig = _cachedConfig.copyWith(enable: savedValue);
    if (_globalEnable.value != savedValue) {
      _globalEnable.value = savedValue;
    }
  } catch (e) {
    debugPrint('Error loading global enable: $e');
  }
}