Merge pull request #507 from know120/main

Update sample code of asynchronous programming in Dart
This commit is contained in:
Fechin authored and GitHub committed 2024-03-18 12:56:19 +08:00
commit d6edac2b97
1 file changed
+2 -2
+2 -2
View File
@@ -492,7 +492,7 @@ Futures
------------
### Async Await
```dart
// functionswhich are asynchronous: they return after setting up a possibly time-consuming operation
// functions which are asynchronous: they return after setting up a possibly time-consuming operation
// The async and await keywords support asynchronous programming
Future<String> login() {
@@ -505,7 +505,7 @@ Future<String> login() {
// Asynchronous
main() async {
print('Authenticating please wait...');
print(await userName());
print(await login());
}
```