In this video we look at the stdin and stdout objects and their methods to read data from the console and print to the console. Follow the full playlist here: • Introducing Flutter
nice explanation one of best dart explain simple any body can easily understand....sir You are one of the best professor on you tube...from your video clear my programing concept .....
or it needs to be a string so you can do int num = int.parse( "${ stdin.readLineSync }" ); this will also act like a string syntax is bit harder to read.
how to fix this while taking input Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
Did you check out this video of mine? th-cam.com/video/LulvhhDiqQw/w-d-xo.html . In the description of the videos you will find a link to the playlist. Better to follow the playlist.
void main() { print('what is your age'); String age=stdin.readLineSync(); print("your age is = $age!"); } It says there is an error here where is the error in stdi
nice explanation one of best dart explain simple any body can easily understand....sir You are one of the best professor on you tube...from your video clear my programing concept .....
Thanks! Nice explanation!
Hi
Can you please make a video that states the exact process of validating a user email address as a well as password using regex?
Thank you
My code runs in debug console instead of terminal and it doesn't takes user inputs even though there is no error.
thanks man your solve my problem thankssss
How to find the data type entered in terminal? Because the only data type I'm getting is " String " even tho I put numbers in there
You have to convert string values to double or integers.
You have to run this program from the terminal for it to work properly
thank u sir
Hello sir why import "dart:io"; is not supported??
they show me that "unsupported import(s) dart:io"
what should i do now sir??
Please check if it is like this: import 'dart:io';
@@JohanJurrius sir i face same problem. what can i do now?
Thanks
for any one having error just put ! at the end.
int num = int.parse( stdin.readLineSync() ! );
thanks man
or it needs to be a string so you can do int num = int.parse( "${ stdin.readLineSync }" ); this will also act like a string syntax is bit harder to read.
my code isn't working ı can't understand where is my mistake
how to fix this while taking input
Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
Did you check out this video of mine? th-cam.com/video/LulvhhDiqQw/w-d-xo.html . In the description of the videos you will find a link to the playlist. Better to follow the playlist.
String? tipo = stdin.readLineSync();
opc = int.parse(tipo!);
Same issue over here
Use var instead of String
thank u
thx
Mine is saying global something
not working, it will freeze the console
void main() {
print('what is your age');
String age=stdin.readLineSync();
print("your age is = $age!");
}
It says there is an error here where is the error in stdi
What is the error?
It's a null safety error.
Try using
Syntax: String?
or
Syntax: stdin.readLineSync()!;
*** SOLUTION FOR THE INT.PARSE **
int x =int.parse(stdin.readLineSync()!)