Classes in Dart - Learn About Classes, Inheritance, Constructors and Abstract Classes in Dart

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

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

  • @prashlovessamosa
    @prashlovessamosa ปีที่แล้ว +9

    All i can say is thank you and you are awesome 👍

    • @VandadNP
      @VandadNP  ปีที่แล้ว

      Thank you too!

  • @user-vi2fp6dl7b
    @user-vi2fp6dl7b 8 หลายเดือนก่อน +1

    Good job! Thank you very much!

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

    what a great lesson! Thank you, Vandad!

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

      My pleasure!

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

    Can you please teach us javascript after dart because your the one who teaches everything in brief that's what I love about you teacher

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

    why constructors are, I leaned only by watching this tutorial :) Thanks @vandad

  • @IsaDemir-zu7fd
    @IsaDemir-zu7fd 9 หลายเดือนก่อน

    In 49:00 we define the method _incrementCarsInstantiated() with static prefix. Is it really necessary? Why it is static? If anyone can explain i will very preciated.

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

    Yes at a point the word "speed" started looking weird too 😂🤣

  • @vickoalan
    @vickoalan ปีที่แล้ว

    thank you

  • @manuelcasares7270
    @manuelcasares7270 ปีที่แล้ว

    Amazing lesson.
    I have one question, what is the rule of the convention of having property names that start with an underscore? Like sometimes there is "speed" and other times "_speed"? thanks

    • @PradeepSharma-xk1to
      @PradeepSharma-xk1to ปีที่แล้ว +1

      Answer generated using chatgpt """In Dart, the convention of using an underscore prefix before a property name, such as "_speed", is a way to indicate that the property or variable is intended to be private within its library or class.
      Dart does not have a built-in access control mechanism like public, protected, or private keywords, but by prefixing an identifier with an underscore, it is considered a convention to mark it as private. This convention serves as a signal to other developers that the property or variable should not be accessed or modified directly from outside the library or class where it is defined.
      By using the underscore prefix, Dart developers are encouraged to encapsulate the internal implementation details of a class or library and expose only the necessary public interface. It helps in preventing direct access to private members, reducing the risk of unintentional modifications or misuse.
      It's important to note that the use of an underscore prefix is purely a convention and not enforced by the Dart language itself. It's up to developers to follow this convention to maintain proper encapsulation and code organization."""

  • @controlledmonster
    @controlledmonster ปีที่แล้ว

    :) Thank You.

  • @mdataullah5489
    @mdataullah5489 ปีที่แล้ว

    1:01:57 I am a little bit confused here:
    void accelerate () => print('$kind is accelerating');
    void decelerate () => print('$kind is decelerating')
    A void function is returning a print()

    • @mdataullah5489
      @mdataullah5489 ปีที่แล้ว

      I think a void function cannot return anything. Right?

    • @VandadNP
      @VandadNP  ปีที่แล้ว +4

      All of these are valid syntax, can you spot the difference? :-)
      void myFunc() {
      // empty
      }
      void yourFunc() => myFunc;
      void theirFunc() => myFunc();
      void testIt() {
      myFunc();
      yourFunc();
      theirFunc();
      }

    • @mdataullah5489
      @mdataullah5489 ปีที่แล้ว

      @@VandadNP I got it. Thank you so much, sir. I know you are a genius.

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

    I am very confused in understanding factory constructors, can you explain them ain a seperate video?? or they hold not much importance in app dev.

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

      They are the only constructor that allow you to create an instance of the subclass of the current class! That's their importance.

  • @richardbaffoe388
    @richardbaffoe388 ปีที่แล้ว

    speeeeeeed😅

  • @Adnankhan545
    @Adnankhan545 ปีที่แล้ว +3

    🤩

    • @VandadNP
      @VandadNP  ปีที่แล้ว +3

      Hope you'll enjoy watching it 😊

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

    I found god❤️