ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
in constructor you have map and then json, what it means and why itis there?Thank you.
Sir pls make videos on single ton
It was so useful. Thank you))
bro can you upload json video
Level sir ji
ty
Did the challengeclass Car { //properties String? name; String? color; String? price; //Constructor 1 Car({required this.name, required this.color, this.price}); // Constructor 2 Car.other(this.name, this.color); //Methods display() { if (price == null) { price = "not stated"; } print("This car is a $name"); print("its color is $color"); print("the price is $price"); print("-----------------------------"); }}void main(List args) { Car car1 = Car(name: "Benz", color: "white", price: "5000"); car1.display(); Car car2 = Car.other("BMW", "BLUE"); car2.display();}
class Car { String? name; String? color; var price; //parameterized constructor Car(this.name, this.color, this.price); void dispaly() { print("car name: $name"); print("car color: $color"); print("car price: $price"); }//named constructor Car.newcar(this.name, this.color, [this.price = "N/A"]);}void main(List args) { Car c = Car("BMW", "BLACK", 100000); c.dispaly(); Car car = Car.newcar("AUDI", "RED"); car.dispaly();}
class Car { String? name; String? color; double? prize; Car({this.name, this.prize, this.color}); Car.second({this.name, this.color}); void display() { print('Name: $name'); print('Color: $color'); print('Prize: $prize'); print('-----------------'); if (prize == null) { prize = 0; } }}void main(){ Car honda= Car(name:'honda', color: 'black', prize: 500000);honda.display();Car bmw= Car(name: 'M4', color: 'Blue', prize: 400000);bmw.display();}
class Car{ // properties String? name; String? color; int? prize; //Constructor Car(this.name,this.color,this.prize); //Name Constructor Car.name(this.name,this.color); // Methods & Function void display(){ if(prize==null){ print('The car prize is $prize'); } print('The car name is $name'); print('The car color is $color'); } }void main(){ // 1st object 3paremeter given Car car=Car('Mercedes','White',5000000); car.display(); // 2nd object 2paremeter given Car car2=Car.name('Porsche', 'Red'); car2.display();}Is the right???
in constructor you have map and then json, what it means and why itis there?
Thank you.
Sir pls make videos on single ton
It was so useful. Thank you))
bro can you upload json video
Level sir ji
ty
Did the challenge
class Car {
//properties
String? name;
String? color;
String? price;
//Constructor 1
Car({required this.name, required this.color, this.price});
// Constructor 2
Car.other(this.name, this.color);
//Methods
display() {
if (price == null) {
price = "not stated";
}
print("This car is a $name");
print("its color is $color");
print("the price is $price");
print("-----------------------------");
}
}
void main(List args) {
Car car1 = Car(name: "Benz", color: "white", price: "5000");
car1.display();
Car car2 = Car.other("BMW", "BLUE");
car2.display();
}
class Car {
String? name;
String? color;
var price;
//parameterized constructor
Car(this.name, this.color, this.price);
void dispaly() {
print("car name: $name");
print("car color: $color");
print("car price: $price");
}
//named constructor
Car.newcar(this.name, this.color, [this.price = "N/A"]);
}
void main(List args) {
Car c = Car("BMW", "BLACK", 100000);
c.dispaly();
Car car = Car.newcar("AUDI", "RED");
car.dispaly();
}
class Car {
String? name;
String? color;
double? prize;
Car({this.name, this.prize, this.color});
Car.second({this.name, this.color});
void display() {
print('Name: $name');
print('Color: $color');
print('Prize: $prize');
print('-----------------');
if (prize == null) {
prize = 0;
}
}
}
void main(){
Car honda= Car(name:'honda', color: 'black', prize: 500000);
honda.display();
Car bmw= Car(name: 'M4', color: 'Blue', prize: 400000);
bmw.display();
}
class Car{
// properties
String? name;
String? color;
int? prize;
//Constructor
Car(this.name,this.color,this.prize);
//Name Constructor
Car.name(this.name,this.color);
// Methods & Function
void display(){
if(prize==null){
print('The car prize is $prize');
}
print('The car name is $name');
print('The car color is $color');
}
}
void main(){
// 1st object 3paremeter given
Car car=Car('Mercedes','White',5000000);
car.display();
// 2nd object 2paremeter given
Car car2=Car.name('Porsche', 'Red');
car2.display();
}
Is the right???