mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 05:24:10 +03:00
Merge pull request #507 from know120/main
Update sample code of asynchronous programming in Dart
This commit is contained in:
1 file changed
+2
-2
@@ -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());
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user