Dart by Example: Static
Static members (functions or properties) are available onthe class itself, instead of on an instance of that class.
1. class Position {
2. // a static function
3. static int get maxX => 100;
5. // a static property
6. static int maxY = 200;
7. }
9. main() {
10. print(Position.maxX);
11. print(Position.maxY);
12. }
1. $ dart static.dart
2. 100
3. 200
