CdnDefinitionProvider class
DefinitionProvider that reads the app manifest from CDN
- Inheritance
-
- Object
- DefinitionProvider
- CdnDefinitionProvider
Constructors
- CdnDefinitionProvider(String appId, {Locale? initialForcedLocale})
Properties
- appId → String
-
final
- baseUrl → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPendingUpdateForTesting ↔ bool
-
getter/setter pair
- initialForcedLocale ↔ Locale?
-
getter/setter pairinherited
- lastUpdatedAtForTesting → int?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyRuntimeManifestForTesting(
Map< String, dynamic> root) → Future<void> -
applyStaleRefreshOutcomeForTesting(
) → Future< void> -
getAppBundle(
{bool? bypassCache = false}) → Future< AppBundle> -
override
-
getAppConfig(
) → UserAppConfig? -
override
-
getDefinition(
{String? screenId, String? screenName}) → Future< ScreenDefinition> -
override
-
getHomeScreenName(
) → String? -
override
-
getI18NDelegate(
{Locale? forcedLocale}) → FlutterI18nDelegate? -
override
-
getSecrets(
) → Map< String, String> -
override
-
getSupportedLanguages(
) → List< String> -
override
-
handlePendingUpdateForTesting(
) → Future< void> -
init(
) → Future< DefinitionProvider> -
override
-
isArtifactRefreshEnabled(
) → bool -
inherited
-
loadCachedStateForTesting(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAppLifecycleStateChanged(
AppLifecycleState state) → void -
override
-
rebuildManifestCacheForTesting(
Map< String, dynamic> root) → void -
refreshIfStaleForTesting(
) → Future< void> -
saveCachedStateForTesting(
String manifestJson, {required String? etag, required int? lastUpdatedAt}) → Future< void> -
shouldApplyCdnStaleRefreshImmediately(
{required bool artifactRefreshEnabled, required bool hasEnsembleConfig}) → bool - Whether a stale CDN refresh should apply immediately (cold start after init) instead of deferring until the next app resume.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
cdnAppVersion(
{String? version, String? buildNumber}) → String? -
Builds app version as
version+buildNumber, e.g.1.2.3+32. -
cdnEnsembleHeaders(
{required String appId, required String runtimeVersion, required String platform, String? appName, String? appVersion, required String userAgent}) → Map< String, String> - CDN request headers identifying the Ensemble runtime and host app.
-
cdnPersistedCacheEntry(
{required String? etag, required int? lastUpdatedAt, required String manifestJson}) → List< String> -
SharedPreferences tuple for CDN cache; etag and timestamp must match
manifestJsonor cold-start If-None-Match can serve a mismatched body. -
cdnUserAgent(
{required String version, required String platform, String? appName}) → String -
Builds the CDN User-Agent string, e.g.
Ensemble/1.2.44 (android; ensemble_live).