forceRefreshRemoteConfig method
Fuerza actualización de remote config
Implementation
Future<void> forceRefreshRemoteConfig({
required String apiKey,
required String instanceURL,
String? remoteConfigURL,
String? appVersion,
bool? proEnv,
}) async {
if (!_isInitialized) return;
final remoteConfig = await _fetchRemoteConfig(
apiKey: apiKey,
instanceURL: instanceURL,
remoteConfigURL: remoteConfigURL,
appVersion: appVersion ?? 'unknown',
proEnv: proEnv ?? false,
);
if (remoteConfig != null) {
_currentConfig =
_mergeWithDefaults(_currentConfig!, remoteConfig).validate();
await _storeCurrentConfig();
await _storeRemoteConfigWithTimestamp(remoteConfig);
// Fetch obsly_tools en force refresh
await _fetchObslyToolsIfAvailable(apiKey);
ObslyLogger.debug('Remote config force refreshed');
}
}