restorePortableStorageImage method
- String text
Validates and replaces resident storage from a portable image.
Call at a settled tick boundary without concurrent signal updates. Clock state, inputs, simulator events, and downstream listeners are not saved.
Implementation
void restorePortableStorageImage(String text) {
if (Simulator.phase != SimulatorPhase.outOfTick) {
throw StateError('Associative storage images require a tick boundary.');
}
final image = AssociativeModelState.fromPortableString(text,
keyWidth: keyWidth, entryCount: entryCount);
_model.load(image, replace: true);
_refresh();
}