null safety
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
class CargoType {
|
||||
String id;
|
||||
String name;
|
||||
double rate;
|
||||
double weight;
|
||||
bool isChecked;
|
||||
int qty;
|
||||
bool isCutomDuty;
|
||||
double customDutyFee;
|
||||
String? id;
|
||||
String? name;
|
||||
double? rate;
|
||||
double? weight;
|
||||
bool? isChecked;
|
||||
int? qty;
|
||||
bool? isCutomDuty;
|
||||
double? customDutyFee;
|
||||
|
||||
double get calAmount => (calRate ?? 0) * (calWeight ?? 0);
|
||||
|
||||
double calRate;
|
||||
double calWeight;
|
||||
double? calRate;
|
||||
double? calWeight;
|
||||
CargoType(
|
||||
{this.id,
|
||||
this.name,
|
||||
@@ -52,7 +52,7 @@ class CargoType {
|
||||
}
|
||||
|
||||
CargoType clone() {
|
||||
return CargoType.fromMap(toMap(), this.id);
|
||||
return CargoType.fromMap(toMap(), this.id!);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -63,7 +63,7 @@ class CargoType {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return name;
|
||||
return name!;
|
||||
}
|
||||
|
||||
bool isChangedForEdit(CargoType cargoType) {
|
||||
|
||||
Reference in New Issue
Block a user