load method

Future<void> load()

Implementation

Future<void> load() async {
  final raw = await persistence?.read();
  if (raw == null || raw.isEmpty) return;
  try {
    final decoded = jsonDecode(raw);
    if (decoded is! Map) return;
    editMode = decoded['editMode'] == true;
    for (final locale in locales) {
      _localeMap(locale)
        ..clear()
        ..addAll(_stringMap(decoded[locale]));
    }
  } catch (_) {}
}