Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Dart_Course/docs/GettingUserInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

First we need to import a low level input-output library to get the basic I/O functions of Dart:

´´´javascript
```javascript
import 'dart:io';
´´´
```

Following code snippet to explain the input functionaltiy of Dart:

´´´javascript
```javascript
print("What is your name?");
String? username = stdin.readLineSync();
print("Hello ${username}!");
´´´
```

´stdin´ is the standard input stream of dart.
´readLineSync()´ reads the line from the standard input.
`stdin` is the standard input stream of dart.

`readLineSync()` reads the line from the standard input.