getData method
Implementation
Future<ThreadResponse> getData(String handle, String uri) async {
late ThreadResponse response;
try {
Tuple2 check = await plugin.resolveHandle(handle);
if (check.item1 != 200) {
throw Exception(check.item2);
}
Tuple2 res = await plugin.getPostThread(uri);
response = ThreadResponse(res.item2);
} catch (e, stacktrace) {
debugPrint("Error: $e");
debugPrint("stacktrace: $stacktrace");
}
return response;
}