void func(String dummy) {
String? name = stdin.readLineSync();
print(name);
}
void main(List<String> args) {
Isolate.spawn(func, "Testing");
}
Why doesn't my program prompts a user input ..and waits for me to enter it. Instead, it simply exits. Can someone help me out with an explanation. Not sure where to look.
I did find a similar question posted where they were using a while loop and using readLineSync inside that..and because of single thread of dart ..it wasn't working there.