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

Поділитися
Вставка

КОМЕНТАРІ • 23

  • @prashlovessamosa
    @prashlovessamosa Рік тому +9

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

  • @АртурЗарипов-б2й
    @АртурЗарипов-б2й 9 місяців тому +1

    Good job! Thank you very much!

  • @DennisVeeMusic
    @DennisVeeMusic Рік тому +1

    what a great lesson! Thank you, Vandad!

  • @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

  • @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."""

  • @IsaDemir-zu7fd
    @IsaDemir-zu7fd 10 місяців тому

    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

  • @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.

  • @controlledmonster
    @controlledmonster Рік тому

    :) Thank You.

  • @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.

  • @Adnankhan545
    @Adnankhan545 Рік тому +3

    🤩

    • @VandadNP
      @VandadNP  Рік тому +3

      Hope you'll enjoy watching it 😊

  • @richardbaffoe388
    @richardbaffoe388 Рік тому

    speeeeeeed😅

  • @frostyfreezemovies
    @frostyfreezemovies Рік тому +1

    I found god❤️