site-www
site-www copied to clipboard
Confusion regarding variable initialization
The part where we Initialize _speed to 0:
It is confusing not knowing exactly where to initialize? Within the class or inside main, or outside?
The part where we Initialize _speed to 0:
@mojjammil Could you please provide any reference to where you are getting confused?
It's in Intro to Dart for Java Developers -> Create a simple Dart class -> Add a read-only variable - > Initialize _speed to 0:
Mentioning it needs to be declared within the class might be handier
Mentioning it needs to be declared within the class might be handier
Dart implements privacy at library level, not the class level (unlike Java). So, placing it anywhere inside the same library would make no difference. Refer here.
~Duplicate of #1463~
@sumandipanshu #1463 doesn't seem to be related. Was there another bug you meant to refer to?
@kwalrath Ahh, sorry i mistakenly linked it to the another issue. This is the issue which i wanted to link, but it seems to be in a different repository.
I understand now. We could be clearer about what we mean.
I would like to work on this issue. But I'm confused about what needs to be done in order to resolve this issue? what kind of info we need to add there? And where is the source code?
@sumandipanshu unfortunately this codelab isn't open source, so a Googler has to fix it. :(
Thanks for the issue!
This codelab has been retired in favor of other learning material which we are working on improving and expanding, as the codelab was not up to date with modern Dart. We will be releasing more learning material over time, and for now, have a bunch of samples at https://dart.dev/language and a detailed walkthrough of different Dart features, that is written in a way that should be familiar to Java developers.
Thanks again!