phase3: nullable fields/methods, casts, ?.call, condition fixes across 11 files. 108->72

This commit is contained in:
2026-08-01 01:16:25 +08:00
parent b8b70a87f9
commit 137eca4c69
12 changed files with 164 additions and 164 deletions

View File

@@ -119,13 +119,13 @@ class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
});
ProductAttribute pa = product.productAttributes![index];
if (pa.required && Utils.selectionsNotEmptyAt(selections, pa.name!)) {
if (pa.required == true && Utils.selectionsNotEmptyAt(selections, pa.name!)) {
setState(() {
nextButtonEnable = true;
productDesc = product.description! + ', ' + extendDescription.join('; ');
productPrice = product.price! + extendPrice;
});
} else if (!pa.required){
} else if (pa.required != true){
setState(() {
nextButtonEnable = true;
productDesc = product.description! + ', ' + extendDescription.join('; ');
@@ -143,9 +143,9 @@ class MobileAttributeSelectionState extends State<MobileAttributeSelection> {
bool _checkCanGoNext() {
ProductAttribute pa = product.productAttributes![index];
if (pa.required && Utils.selectionsNotEmptyAt(selections, pa.name!)) {
if (pa.required == true && Utils.selectionsNotEmptyAt(selections, pa.name!)) {
return true;
} else if (!pa.required){
} else if (pa.required != true){
return true;
}
return false;