Published
- 1 min read
dart get String input from user
The solution for this is noted below
dart get String input from user
Solution
import 'dart:io';
void main()
{
print("Enter your name?");
// Reading name of the Geek
String name = stdin.readLineSync();
// Printing the name
print("Hello, $name! \nWelcome to GeeksforGeeks!!");
}
Try other methods by searching on the site. That is if this doesn’t work