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

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 23

  • @prashlovessamosa
    @prashlovessamosa Год назад +9

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

  • @АртурЗарипов-б2й
    @АртурЗарипов-б2й 10 месяцев назад +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

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

  • @ashiquealimughal7684
    @ashiquealimughal7684 Год назад +1

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

  • @vickoalan
    @vickoalan Год назад

    thank you

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

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

  • @richardbaffoe388
    @richardbaffoe388 Год назад

    speeeeeeed😅

  • @Adnankhan545
    @Adnankhan545 Год назад +3

    🤩

    • @VandadNP
      @VandadNP  Год назад +3

      Hope you'll enjoy watching it 😊

  • @frostyfreezemovies
    @frostyfreezemovies Год назад +1

    I found god❤️