DEV Community

Omnipotent_0000
Omnipotent_0000

Posted on

Need help in DART

Hello everyone I am new to this community and this dart language, I will get to the point here
I am trying to take input from my console but the console is not taking it. I wrote the whole code pretty accurately , even if I just copy the code from ChatGPT , youtube , blogs etc , its not taking the output , It shows all the other ouput before taking input but when it comes to take input it just stop taking it

here is the code
// importing dart:io file
import 'dart:io';

void main()
{
print("Enter your name?");
// Reading name of the Geek
String? name = stdin.readLineSync(); // null safety in name string

// Printing the name
print("Hello, $name! \nWelcome to GeeksforGeeks!!");
}

if I use other platforms like tutorialpoints it works fine but not on idx by google nor vs code

Top comments (0)