getTodoFile static method

Future<String> getTodoFile()

Implementation

static Future<String> getTodoFile() async {
  String todoFilePath = "${Directory.current.path}/todo.txt";
  File todoFile = File(todoFilePath);
  if (!await todoFile.exists()) {
    print("ERROR: 'todo.txt' not found");
    exit(1);
  }
  String content = await todoFile.readAsString();
  return content;
}