loadFromPathIntoKey method

Future<NUIGlobalConfig> loadFromPathIntoKey(
  1. String path,
  2. String key
)

Implementation

Future<NUIGlobalConfig> loadFromPathIntoKey(String path, String key) async {
  String content = await rootBundle.loadString(path);
  Map<String, dynamic> configAsMap = json.decode(content);
  _appConfig.putIfAbsent(key, () => configAsMap);
  return this;
}