phase3: FIX arg-bang regex (missing \] in char class skipped subscripts). 235->183
This commit is contained in:
@@ -40,7 +40,7 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
S.of(context).radio_option_select_token(product.productAttributes![this.index].name),
|
||||
S.of(context).radio_option_select_token(product.productAttributes![this.index].name!),
|
||||
style: new TextStyle(
|
||||
fontSize: 12.5,
|
||||
),
|
||||
@@ -102,7 +102,7 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
||||
extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
|
||||
if (exclusiveRule != null) {
|
||||
if (_checkOptionIsCheck(productOption.name!)) {
|
||||
setOptionsStateDisabled(product.productAttributes![index].name, false);
|
||||
setOptionsStateDisabled(product.productAttributes![index].name!, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,24 +118,24 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
||||
children: <Widget>[],
|
||||
);
|
||||
|
||||
List<ProductOption> productOptions = product.productAttributes![index].productOptions;
|
||||
List<ProductOption> productOptions = product.productAttributes![index].productOptions!;
|
||||
|
||||
if (!optionsState.containsKey(product.productAttributes![index].name)) {
|
||||
List<Map<String, dynamic>> optionState = [];
|
||||
for (var i = 0; i < productOptions.length; i++) {
|
||||
optionState.add({'name': product.productAttributes![index].productOptions![i].name, 'disabled': false, 'check': false});
|
||||
}
|
||||
optionsState[product.productAttributes![index].name] = optionState;
|
||||
optionsState[product.productAttributes![index].name!] = optionState;
|
||||
}
|
||||
|
||||
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);
|
||||
if (exclusiveRule != null) {
|
||||
if (_checkOptionIsCheck(productOptions[i].name!)) {
|
||||
setOptionsStateDisabled(product.productAttributes![index].name, true);
|
||||
setOptionsStateDisabled(product.productAttributes![index].name!, true);
|
||||
optionsState[product.productAttributes![index].name][i]['disabled'] = false;
|
||||
break;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
||||
}
|
||||
|
||||
bool _checkOptionIsCheck(String name) {
|
||||
if (Utils.selectionsContains(selections, product.productAttributes![index].name, name) != -1) {
|
||||
if (Utils.selectionsContains(selections, product.productAttributes![index].name!, name) != -1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user