save method

void save(
  1. String root
)

Write the store under root/.dialect/state.json, creating the directory if needed. Canonical form: version first, then remaining top-level keys sorted, checks keys sorted, 2-space indent, trailing newline.

Implementation

void save(String root) {
  final file = File(p.join(root, '.dialect', 'state.json'));
  file.parent.createSync(recursive: true);
  file.writeAsStringSync(encode());
}