I'm a beginner in Dart. I want to write a program that takes an input and print it with some predefined text. This is how my code looks like:
import 'dart:convert';
import 'dart:io';
main() {
print('What is your name?');
print('Hello ${stdin.readLineSync(encoding: utf8)}');
}
And this is the how the command line looks like:
What is your name?
Leó Takács
Hello Le Takcs
It's just delete all the special characters. I think the problem is with the readLineSync because I tried printing 'Leó' and it works that way. My Dart SDK version is 2.14.2 by the way.
Thanks for your help!