I'm new at dart. I think that it's about the new dart version that I can't assign String to stdin.readLineSync(). Can Someone Pls tell me the alternatives?
This is just a basic calculator where I'm trying to add two numbers.
import 'dart:io';
import 'dart:math';
void main() {
print("Enter first number: ");
String? num1 = stdin.readLineSync();
print("Enter second number: ");
String? num2 = stdin.readLineSync();
print(num1 + num2);
}