getIssues function
Implementation
Future<String> getIssues(String link) async {
var myClient = baseClient();
var resp =
await myClient.get(Uri.parse(link)).timeout(const Duration(seconds: 10));
if (resp.statusCode == 200) {
final html = parse(resp.body.toString());
var issues = html
.querySelectorAll(
"#repo-content-pjax-container > div > div.d-block.d-lg-none.no-wrap > div")
.first
.text
.trim()
.replaceAll(" ", "")
.replaceAll("\n", "")
.replaceAll("Open", " Open, ")
.replaceAll("Closed", " Closed");
//
return issues;
} else {
writeAnsi("Github is not responding", c: AnsiColor.red);
return "";
}
}