get_config library

Classes

CDNConfigOptions
CDN Configuration options

Functions

clearConfigCache() Future<void>
Clears the cached configuration
fetchConfigFromCDN([CDNConfigOptions? options]) Future<CDNConfig>
Fetches configuration from CDN with automatic caching This function never throws errors - it always returns a valid config from cache, CDN, or local file
getCachedConfigOnly() Future<CDNConfig?>
Gets the current cached configuration without fetching from CDN Returns null if no valid cache exists
getConfig({CDNConfigOptions? customOptions}) Future<CDNConfig>
Convenience function to get configuration with automatic caching
getConfigCacheTimestamp() Future<int?>
Gets the timestamp of the last cached config
getConfigWithRetry({CDNConfigOptions? options, int maxRetries = 2, int retryDelay = 1000}) Future<CDNConfig>
Gets configuration with retry logic Attempts to fetch config multiple times before falling back
isConfigCacheValid() Future<bool>
Checks if the cached configuration is still valid
preloadConfig([CDNConfigOptions? options]) → void
Preloads configuration in the background This is useful to call during app initialization
refreshConfig([CDNConfigOptions? options]) Future<CDNConfig>
Forces a refresh of the configuration from CDN This will bypass the cache and fetch fresh data