restore method

void restore(
  1. CodeBlock block,
  2. String name
)

Implementation

void restore(CodeBlock block, String name) {
  if (!stored.containsKey(name)) {
    throw StateError('Variable has never been stored: $name');
  }

  final variable = stored[name]!;
  block.assign(name, ref(variable));
}