restoreMemory method
Replaces memory with data. Use after loading a snapshot (restore on launch).
Example: flow.restoreMemory(snapshot.memory);
Implementation
void restoreMemory(Map<String, dynamic> data) {
memory.clear();
memory.addAll(Map<String, dynamic>.from(data));
}