phase3: nullfix arg-bang handler (argument_type/invalid_assignment). 872 -> 621

This commit is contained in:
2026-07-25 18:16:40 +08:00
parent c21ccbd54d
commit a76b872966
65 changed files with 282 additions and 257 deletions

View File

@@ -133,7 +133,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
Map<String, dynamic> attrExtraJson = Utils.stringToJson(
Map<String, dynamic> attrExtraJson = Utils.stringToJson(!
product.productAttributes![index].extra);
if (attrExtraJson != null) {
var selectLimitIfFieldEqualsTo = Rule.getRule(
@@ -187,17 +187,17 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
}
for (var i = 0; i < productOptions.length; i++) {
Map<String, dynamic> extraJson = Utils.stringToJson(
productOptions[i].extra);
Map<String, dynamic> extraJson = Utils.stringToJson(!
productOptions[i].extra!);
if (extraJson != null) {
Map<String, dynamic> exclusiveRule = Rule.getRule(
extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
Map<String, dynamic> multiItemRule = Rule.getRule(extraJson, Rule.RULE_ACTUAL_QTY_IS);
if (exclusiveRule != null) {
if (thisLimitQty > 0 && !_checkOptionIsCheck(productOptions[i].name)) {
if (thisLimitQty > 0 && !_checkOptionIsCheck(productOptions[i].name!)) {
optionsState[product.productAttributes![index].name][i]['disabled'] = true;
} else {
if (_checkOptionIsCheck(productOptions[i].name)) {
if (_checkOptionIsCheck(productOptions[i].name!)) {
setOptionsStateDisabled(
product.productAttributes![index].name, true);
optionsState[product.productAttributes![index]
@@ -207,7 +207,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
}
}
if (multiItemRule != null) {
if (_checkOptionIsCheck(productOptions[i].name)) {
if (_checkOptionIsCheck(productOptions[i].name!)) {
if (multiItemRule[Rule.RULE_ACTUAL_QTY_IS] > thisLimitQty - (selections[product.productAttributes![index].name!.toUpperCase()] as List).length) {
disableOptionIfNotSelected();
}
@@ -249,9 +249,9 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
Widget _getOptionCheck(ProductOption productOption, bool optDisabled, int optIndex) {
bool disabled = optDisabled;
bool check = _checkOptionIsCheck(productOption.name);
bool check = _checkOptionIsCheck(productOption.name!);
Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra);
Map<String, dynamic> extraJson = Utils.stringToJson(productOption.extra!);
// Utils.jsonPrettyPrint(extraJson);
double extraAdjustAmount = 0.0;
@@ -333,7 +333,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text(
productOption.name,
productOption.name!,
style: new TextStyle(
fontSize: 14.0,
color: check ? selectedTextColor : deselectTextColor,