KwikPassCDNConfig class
KwikPass CDN Configuration Manager
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cacheConfig(
CDNConfig config) → Future< void> - Caches CDN configuration with current timestamp
-
clearCache(
) → void - Clears the in-memory cache
-
clearConfigCache(
) → Future< void> - Clears the cached CDN configuration
-
getAnalyticsEvent(
String eventConstant) → String? - Gets a specific analytics event from CDN config using constant identifiers
-
getCachedConfig(
) → Future< CDNConfig?> - Gets cached CDN configuration if available and valid
-
getCDNConfig(
) → CDNConfig? - Gets CDN config from cache if valid, otherwise returns null
-
getCheckout(
[String? key]) → dynamic - Gets checkout configuration from CDN config
-
getConfigCacheTimestamp(
) → Future< int?> - Gets the timestamp of the last cached CDN config
-
getEndpoint(
String endpointConstant) → String? - Gets a specific API endpoint from CDN config using constant identifiers
-
getEnvironment(
String envConstant) → EnvironmentConfig? - Gets a specific environment configuration from CDN config using constant identifiers
-
getHeader(
String headerConstant) → String? - Gets a specific header from CDN config using constant identifiers
-
getKeys(
String keyConstant) → String? - Gets a specific storage key from CDN config using constant identifiers
-
getSnowplowSchema(
[String? schemaConstant]) → dynamic - Gets a specific snowplow schema from CDN config using constant identifiers If no schema constant is provided, returns all schemas
-
getStoredCDNConfig(
) → Future< CDNConfig?> - Gets stored CDN config from SecureStorage if valid
-
getValue(
String key) → Future< String?> - Retrieves a value from the cache or SecureStorage
-
initialize(
) → Future< void> - Initialize the CDN config by loading the bundled JSON from package This should be called once during app initialization
-
isCacheValid(
) → Future< bool> - Checks if cached CDN config is still valid (within cache duration)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processCDNResponse(
dynamic rawData) → CDNConfig - Processes raw CDN response data
-
removeValue(
String key) → void - Remove a value from the cache and SecureStorage
-
setCDNConfig(
CDNConfig config) → void - Sets CDN config with timestamp for cache management
-
setValue(
String key, String value) → void - Sets a value in the cache and SecureStorage
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited