这是我简单的飞镖代码。这需要用户名。
import 'dart:io';
void main() {
print("Enter Your name: ");
String userName = stdin.readLineSync();
print("Welcome $userName");
}
这里是输出:
Enter Your name: // I want to enter it here.
jay //but it forces me to enter here.
Welcome jay
答案 0 :(得分:2)
stdout.write
应该做您想要的:
stdout.write("Enter Your name: ")