SaveMigration typedef

SaveMigration = Map<String, dynamic> Function(Map<String, dynamic> data)

A single save-format migration step.

Receives the decoded save file (the full top-level map, including version, timestamp, metadata and resources) at version N and returns the equivalent data at version N + 1. The SaveManager sets version on the returned map itself, so steps don't need to.

Steps may mutate and return data or build a new map.

Implementation

typedef SaveMigration =
    Map<String, dynamic> Function(Map<String, dynamic> data);