load method

void load({
  1. bool clear = true,
})

Implementation

void load({bool clear = true}) {
  if (clear) configMap.clear();
  if (!_file.existsSync()) return;
  String text = _file.readAsStringSync();
  if (text.isEmpty) {
    return;
  }
  dynamic v = json.decode(text);
  if (v == null) return;
  if (v is Map) {
    for (var a in v.entries) {
      configMap[a.key] = a.value;
    }
  }
}