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
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."""
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.
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()
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(); }
All i can say is thank you and you are awesome 👍
Thank you too!
Good job! Thank you very much!
what a great lesson! Thank you, Vandad!
My pleasure!
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
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
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."""
why constructors are, I leaned only by watching this tutorial :) Thanks @vandad
thank you
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.
Yes at a point the word "speed" started looking weird too 😂🤣
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()
I think a void function cannot return anything. Right?
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();
}
@@VandadNP I got it. Thank you so much, sir. I know you are a genius.
:) Thank You.
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.
They are the only constructor that allow you to create an instance of the subclass of the current class! That's their importance.
speeeeeeed😅
🤩
Hope you'll enjoy watching it 😊
I found god❤️