Const Constructor In Dart - Learn Dart Programming
ฝัง
- เผยแพร่เมื่อ 15 ต.ค. 2024
- This video covers information about const constructor in dart. You will learn how to create const constructor with different examples.
Guide: dart-tutorial....
Learn Dart ➤: dart-tutorial....
Connect With Me:
● Facebook➤: / bishworajpoudelofficial
● Instagram➤: / bishworajpoudelofficial
● Linkedin➤: / bishworajpoudelofficial
● Github➤: github.com/bis...
#Dart #Constructor #DartConstructor #ConstConstructor #LearnDart
please make video ENCAPSULATION IN DART
Thank you!
is there any difference between these?
const Point p1 = Point(x: 5, y: 1);
const Point p2 = Point(x: 5, y: 1);
Point p3 = const Point(x: 5, y: 1);
Point p4 = const Point(x: 5, y: 1);
const Point p5 = const Point(x: 5, y: 1);
const Point p6 = const Point(x: 5, y: 1);
There are no difference between them. it's work fine .
But we used const keyword only one side , it is recommended.