I first learned C++ in school. Now i started learning dart online. Like in C++ we use Cout to print out our result and its equivalent in Dart is Print(). what is the equivalent of Cin in Dart like how we input data from user in Dart coding?
Asked
Active
Viewed 1,040 times
0
-
1[See here](https://stackoverflow.com/questions/11122732/how-do-i-read-console-input-stdin-in-dart), dart.io library has stdin object that you can use – Andrija Nov 25 '20 at 13:33
-
Hi, does my answer solve your problem? – ch271828n Nov 27 '20 at 09:21
1 Answers
1
Firstly, if you are using dart, stdin.readLineSync
would help.
Secondly, if you are going to use Flutter, you can use a TextField
to allow user input strings. You can also use other kinds of UI elements, such as FlatButton
s.

ch271828n
- 15,854
- 5
- 53
- 88