debugRemoteConfigWeb function
Debug Remote Config specifically for web platform issues
Implementation
Future<void> debugRemoteConfigWeb() async {
if (!kIsWeb) {
logd('β This debug function is only for web platform');
return;
}
logd('π === DEBUG REMOTE CONFIG FOR WEB ===');
try {
// 1. Check Firebase instance and project
final instance = FirebaseRemoteConfig.instance;
final app = instance.app;
logd('π₯ Firebase project: ${app.options.projectId}');
logd('π₯ Firebase app name: ${app.name}');
logd('π₯ Remote Config instance: ${instance.hashCode}');
// 2. Check fetch status
final lastFetchTime = instance.lastFetchTime;
final lastFetchStatus = instance.lastFetchStatus;
logd('π
Last fetch time: $lastFetchTime');
logd('π Last fetch status: $lastFetchStatus');
// 3. Check defaults are set
final testDefault = instance.getString('minimumAppVersionRecommendedApple');
logd('π± Default value for minimumAppVersionRecommendedApple: "$testDefault"');
// 4. Check all version-related values
await _logAllVersionValues();
// 5. Check value sources
await _logValueSources();
// 6. Test manual fetch (web-specific)
await _testWebFetch();
// 7. Check dependency injection
await _testDependencyInjection();
// 8. Check AppConfigBase values
await _testAppConfigBaseValues();
} catch (e) {
loge('β Error during web debug: $e');
}
logd('π === END DEBUG REMOTE CONFIG FOR WEB ===');
}