MiniProgramManifest class abstract

Canonical manifest contract delivered to hosts and the shared SDK.

Available extensions
Annotations
  • @freezed

Constructors

MiniProgramManifest({required String id, required String version, required String entry, required String contractVersion, @SdkVersionRangeConverter() required SdkVersionRange sdkVersionRange, @CapabilityIdListConverter() required List<CapabilityId> requiredCapabilities, @MiniProgramScreenFormatConverter() @Default.new(MiniProgramScreenFormats.mp) MiniProgramScreenFormat screenFormat, @Default.new(1) int? screenSchemaVersion, @Default.new(<FeatureFlagKey>[]) List<CapabilityId> featureFlags, @Default.new(MiniProgramCachePolicy()) MiniProgramCachePolicy cachePolicy, MiniProgramFallback? fallback})
const
factory
MiniProgramManifest.fromJson(Map<String, dynamic> json)
factory

Properties

allowsEntryScreenStaleCache → bool

Available on MiniProgramManifest, provided by the MiniProgramManifestX extension

Whether the entry screen may be reused from stale cache on backend errors.
no setter
allowsManifestStaleCache → bool

Available on MiniProgramManifest, provided by the MiniProgramManifestX extension

Whether the manifest itself may be reused from stale cache on backend errors.
no setter
cachePolicy → MiniProgramCachePolicy
no setterinherited
contractVersion → String
no setterinherited
copyWith → $MiniProgramManifestCopyWith<MiniProgramManifest>
Create a copy of MiniProgramManifest with the given fields replaced by the non-null parameter values.
no setterinherited
entry → String
no setterinherited
entryScreenMaxStaleAge → Duration

Available on MiniProgramManifest, provided by the MiniProgramManifestX extension

Maximum allowed stale age for entry-screen reuse after retryable failures.
no setter
fallback → MiniProgramFallback?
no setterinherited
featureFlags → List<CapabilityId>
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
no setterinherited
manifestMaxStaleAge → Duration

Available on MiniProgramManifest, provided by the MiniProgramManifestX extension

Maximum allowed stale age for manifest reuse after retryable failures.
no setter
requiredCapabilities → List<CapabilityId>
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenFormat → String
no setterinherited
screenSchemaVersion → int?
no setterinherited
sdkVersionRange → SdkVersionRange
no setterinherited
usesMpScreenFormat → bool

Available on MiniProgramManifest, provided by the MiniProgramManifestX extension

Whether this manifest points at an Mp JSON screen document.
no setter
version → String
no setterinherited

Methods

hasFeatureFlag(FeatureFlagKey key) → bool

Available on MiniProgramManifest, provided by the MiniProgramManifestX extension

Whether the manifest declares the given feature flag key.
map<TResult extends Object?>(TResult $default(_MiniProgramManifest value)) → TResult

Available on MiniProgramManifest, provided by the MiniProgramManifestPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_MiniProgramManifest value)?) → TResult?

Available on MiniProgramManifest, provided by the MiniProgramManifestPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_MiniProgramManifest value)?, {required TResult orElse()}) → TResult

Available on MiniProgramManifest, provided by the MiniProgramManifestPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String version, String entry, String contractVersion, SdkVersionRange sdkVersionRange, List<CapabilityId> requiredCapabilities, MiniProgramScreenFormat screenFormat, int? screenSchemaVersion, List<CapabilityId> featureFlags, MiniProgramCachePolicy cachePolicy, MiniProgramFallback? fallback)?, {required TResult orElse()}) → TResult

Available on MiniProgramManifest, provided by the MiniProgramManifestPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requiresCapability(Object? capability) → bool

Available on MiniProgramManifest, provided by the MiniProgramManifestX extension

Whether the manifest requires a given host capability.
toJson() → Map<String, dynamic>
Serializes this MiniProgramManifest to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String id, String version, String entry, String contractVersion, SdkVersionRange sdkVersionRange, List<CapabilityId> requiredCapabilities, MiniProgramScreenFormat screenFormat, int? screenSchemaVersion, List<CapabilityId> featureFlags, MiniProgramCachePolicy cachePolicy, MiniProgramFallback? fallback)) → TResult

Available on MiniProgramManifest, provided by the MiniProgramManifestPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String version, String entry, String contractVersion, SdkVersionRange sdkVersionRange, List<CapabilityId> requiredCapabilities, MiniProgramScreenFormat screenFormat, int? screenSchemaVersion, List<CapabilityId> featureFlags, MiniProgramCachePolicy cachePolicy, MiniProgramFallback? fallback)?) → TResult?

Available on MiniProgramManifest, provided by the MiniProgramManifestPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) → bool
The equality operator.
inherited