Future<String?> readFileAsString(String path) async { var file = File(path); String? contents; if (await file.exists()) { contents = await file.readAsString(); } return contents; }