Future<String> read() async { if (pathOrUrl.startsWith("http")) { var response = await http.get(Uri.parse(pathOrUrl)); return response.body; } return File(pathOrUrl).readAsString(); }