Dart Tutorial #26 - static Keyword in Dart Programming
In this video by Programming for Beginners we will see static Keyword in Dart Programming used as static fields and static methods or functions in class, using Dart Tutorial videos. We can learn Dart Programming language to make web applications or mobile applications using flutter framework. Also we can make single-page web applications using Dart programming.
The static keyword can be applied to the data members of a class, i.e., fields and methods. A static variable retains its values till the program finishes execution. Static members are referenced by the class name.
Example:
class StaticMem {
static int num;
static disp() {
print("The value of num is ${StaticMem.num}") ;
}
}
void main() {
StaticMem.num = 12;
// initialize the static variable }
StaticMem.disp();
// invoke the static method
}
Dart Tutorial Playlist:
• Dart Tutorial
VS Code Editor:
https://code.visualstudio.com/download
Online Dartpad:
https://dartpad.dartlang.org/
Dart SDK:
https://www.dartlang.org/install/arch...
YouTube Gears:
Microphone: https://amzn.to/3iIk5K3
Mouse: https://amzn.to/35irmNF
Laptop: https://amzn.to/3iG0jyD
#Dart #Tutorial #Programming
============================
LIKE | SHARE | COMMENT | SUBSCRIBE
Thanks for watching :)