restoreMemory method

void restoreMemory(
  1. Map<String, dynamic> data
)

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));
}