I wish to get a string so as to pass to the second activity in flutter from the async function below:
Future<String> getString() async {
return await readFromFile("./abc.txt").toString();
}
My problem is getting hold of a string from the function above and use it inside onPressed() funtion, I want to navigate to the next page and wish to pass the string along to the next page. Whenever I try doing this, it gives me something like 'instance of Future...' instead of the actual string.