migrate property

Map<String, Object?> Function(int fromVersion, Map<String, Object?> json)? migrate
final

Upgrades a JSON map saved under an older fromVersion to a shape fromJson can read. Defaults to identity (no-op) — a pack that never changes shape doesn't need to supply one.

Implementation

final Map<String, Object?> Function(
  int fromVersion,
  Map<String, Object?> json,
)?
migrate;