phase3: nullfix arg-bang handler (argument_type/invalid_assignment). 872 -> 621
This commit is contained in:
@@ -131,7 +131,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
||||
List<Map<String, dynamic>> optionState = [];
|
||||
for (var i = 0; i < productOptions.length; i++) {
|
||||
int qty = 0;
|
||||
int idx = Utils.selectionsContains(selections, product.productAttributes![index].name, productOptions[i].name);
|
||||
int idx = Utils.selectionsContains(selections, product.productAttributes![index].name, productOptions[i].name!);
|
||||
if (idx != -1) {
|
||||
qty = selections[product.productAttributes![index].name!.toUpperCase()][idx]['quantity'];
|
||||
}
|
||||
@@ -141,7 +141,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
||||
}
|
||||
|
||||
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(
|
||||
@@ -195,17 +195,17 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
||||
}
|
||||
|
||||
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]
|
||||
@@ -215,7 +215,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
@@ -257,9 +257,9 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
||||
|
||||
Widget _getOptionQty(ProductOption productOption, bool optDisabled, int quantity, 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;
|
||||
@@ -351,7 +351,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
productOption.name,
|
||||
productOption.name!,
|
||||
style: new TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: check ? selectedTextColor : deselectTextColor,
|
||||
|
||||
Reference in New Issue
Block a user