“The argument type ‘String?’ can’t be assigned to the parameter type ‘String'” when using stdin.readLineSync()

Welcome to Dart. What you are experience is the new null-safety feature (introduced with Dart 2.12.0) where variables by default cannot contain the value null. This is statically checked so you will get an error even before your program are executed. In your example the problem is the following line: var input = stdin.readLineSync(); If … Read more