loadFromFiles method
Implementation
Future<Map<String, dynamic>> loadFromFiles(
Iterable<String> files,
) async {
// TODO: make it case insensitive?
final namespaces = HashMap<String, dynamic>();
for (final file in files) {
// TODO: make this a lazy eval and let loading be handed concurrently?
final namespace = path.basenameWithoutExtension(file);
final string = await bundle.loadString(file, cache: cache);
namespaces[namespace] = jsonDecode(string);
}
return namespaces;
}