User Input In Dart - Learn Dart Programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

ความคิดเห็น • 9

  • @harisharma2520
    @harisharma2520 2 ปีที่แล้ว

    Thank you for dart tutorial

  • @fathimathulnazasaleem961
    @fathimathulnazasaleem961 11 หลายเดือนก่อน

    good videos

  • @karanjadhav2041
    @karanjadhav2041 ปีที่แล้ว +1

    At 4:42 you changed the method from directly getting number from int variable, you first crated value variable from string then calculated square ... can you pls tell me why so why didn't first method work out

    • @shahd6228
      @shahd6228 ปีที่แล้ว +2

      Because the input from the user is always a String. String? value = stdin.readLineSync(); it reads a line of text from the user and saves it to the variable value Then we should ensure that the value is not null, that's why he used the method toString() on the value by writing: value.toString() then he parsed it to an integer with the method int.parse Btw here he does not have to use toString to ensure that value is not null, because value is already a String. He could have used the null assertion operator ! to tell Dart that we're sure that value is not null, so we can safely pass it to the int.parse() method without calling toString(). So he could write: int numericValue = int.parse(value!);

    • @BrianMantel
      @BrianMantel 8 หลายเดือนก่อน

      @@shahd6228 Thank you. I've been trying to figure out what the ! was for. :)

  • @SRSvlog770
    @SRSvlog770 2 ปีที่แล้ว

    Hello Bishoraj brother which software do you use for screen recoder as well as video editing

    • @darttutorial
      @darttutorial  2 ปีที่แล้ว +1

      OBS for recording, Premiere for editing

  • @khubaibirfan9215
    @khubaibirfan9215 2 ปีที่แล้ว

    ❤️❤️❤️❤️