preloadConfig function

void preloadConfig([
  1. CDNConfigOptions? options
])

Preloads configuration in the background This is useful to call during app initialization

Usage:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await SecureStorage.init();
  
  // Preload config in background
  preloadConfig();
  
  runApp(MyApp());
}

@param options Optional CDN configuration options

Implementation

void preloadConfig([CDNConfigOptions? options]) {
  // Fire and forget - don't await
  fetchConfigFromCDN(options).then((config) {
    // print('[CDN Config] ✅ Preloaded configuration');
  }).catchError((error) {
    // print('[CDN Config] ⚠️ Preload failed: $error');
  });
}