getConfigFile static method
Implementation
static Future<Map<String, dynamic>> getConfigFile() async {
String path = "todo.json";
File jsonFile = File(path);
if (!await jsonFile.exists()) {
print(
"ERROR: Configuration file 'todo.json' not found on project root folder");
exit(1);
}
Map<String, dynamic> jsonDecoded =
jsonDecode(await jsonFile.readAsString());
return jsonDecoded;
}