*There was a mistake in recognition in the first post, so this is a correction
If you write
data=wait readData() from the method with async, you will wait, but if you don't use the method, you will get an error saying that you can't use wait.
How can I use a method without async?
Determine the question as a way to invoke the asynchronous method
readData() from one other asynchronous operation
Asynchronous processing is available in some programming languages with the word
away is used to call asynchronous functions from asynchronous functions and cannot be called from normal functions.(
wait can be called without but cannot receive callback, etc.)
wait deployment and are available.
Asynchronous processing in Dart appears to be called
future.To use it
Future API specifies the
then() method for callback acceptance(?) of asynchronous processing completion
In addition, the
Future API of Dart corresponds to
© 2022 OneMinuteCode. All rights reserved.