RemoteContentPack<T> constructor

RemoteContentPack<T>({
  1. required String assetPath,
  2. required int schemaVersion,
  3. required T fromJson(
    1. Map<String, Object?> json
    ),
  4. Map<String, Object?> migrate(
    1. int fromVersion,
    2. Map<String, Object?> json
    )?,
  5. String? contentSecret,
  6. Future<Map<String, Object?>> fetchRemote()?,
  7. AssetBundle? bundle,
})

Legacy/source-compatible constructor — cache disabled, byte-for-byte the same public signature and behavior as before ENH-94. Use RemoteContentPack.withCache to opt into persistence.

Implementation

RemoteContentPack({
  required this.assetPath,
  required this.schemaVersion,
  required this.fromJson,
  this.migrate,
  this.contentSecret,
  this.fetchRemote,
  AssetBundle? bundle,
}) : storage = null,
     cacheKey = null,
     maxCacheAge = null,
     historyCapacity = null,
     contentVersionResolver = null,
     _bundle = bundle ?? rootBundle;