Async Await
It is a programming pattern in Flutter that makes it easier to write asynchronous code. It allows you to write asynchronous code that looks and behaves like synchronous code.
- async: The async keyword is used to mark a function as asynchronous, which means that the function can run asynchronously and not block the main thread.
- await: The await keyword is used inside an async function to wait for the result of an asynchronous operation before continuing the execution of the function.
With async
/await
, you can write asynchronous code that is easy to read, write, and maintain.
Learn more from the following resources: