phase3: FIX arg-bang regex (missing \] in char class skipped subscripts). 235->183
This commit is contained in:
@@ -757,7 +757,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
|||||||
subtotal = 0.0;
|
subtotal = 0.0;
|
||||||
|
|
||||||
for (var i = 0; i < cartInfo!.productList!.length; i++) {
|
for (var i = 0; i < cartInfo!.productList!.length; i++) {
|
||||||
subtotal += cartInfo!.productList![i].totalPrice;
|
subtotal += cartInfo!.productList![i].totalPrice!;
|
||||||
column.children.add(lineItem(cartInfo!.productList![i]));
|
column.children.add(lineItem(cartInfo!.productList![i]));
|
||||||
}
|
}
|
||||||
column.children.add(GestureDetector(
|
column.children.add(GestureDetector(
|
||||||
@@ -863,7 +863,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
|||||||
Container(
|
Container(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
child: Text(
|
child: Text(
|
||||||
S.of(context).extra_fee_token(cartInfo!.extraFeeList![i].name, cartInfo!.extraFeeList![i].rate),
|
S.of(context).extra_fee_token(cartInfo!.extraFeeList![i].name!, cartInfo!.extraFeeList![i].rate!),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
@@ -1342,7 +1342,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0, bottom: 12.0),
|
padding: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0, bottom: 12.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
bookingDateTime.bookTimes![position].viewTime,
|
bookingDateTime.bookTimes![position].viewTime!,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
@@ -1581,7 +1581,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
|||||||
for (var i = 0; i < coupons!.length; i++) {
|
for (var i = 0; i < coupons!.length; i++) {
|
||||||
if (selectedCoupon == coupons![i].id) {
|
if (selectedCoupon == coupons![i].id) {
|
||||||
if (coupons![i].isPercentage == true) {
|
if (coupons![i].isPercentage == true) {
|
||||||
return S.of(context).percentage_discount_token2(couponDiscountAmount.toStringAsFixed(2), coupons![i].valueAmount);
|
return S.of(context).percentage_discount_token2(couponDiscountAmount.toStringAsFixed(2), coupons![i].valueAmount!);
|
||||||
} else {
|
} else {
|
||||||
return S.of(context).discount_amount_token(couponDiscountAmount.toStringAsFixed(2));
|
return S.of(context).discount_amount_token(couponDiscountAmount.toStringAsFixed(2));
|
||||||
}
|
}
|
||||||
@@ -1957,7 +1957,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
for (int i = 0; i < cartInfo!.businessInfo!.quickInputs!.length; i++) {
|
for (int i = 0; i < cartInfo!.businessInfo!.quickInputs!.length; i++) {
|
||||||
String qi = cartInfo!.businessInfo!.quickInputs![i].value;
|
String qi = cartInfo!.businessInfo!.quickInputs![i].value!;
|
||||||
w.children.add(TextButton(
|
w.children.add(TextButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
qi,
|
qi,
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ class DesktopOrdersState extends State<DesktopOrders> with SingleTickerProviderS
|
|||||||
row.children.add(Expanded(
|
row.children.add(Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
order!.cartInfo!.productList![0].name,
|
order!.cartInfo!.productList![0].name!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ class DesktopProductDetailPageState extends State<DesktopProductDetailPage>
|
|||||||
images.add(productDetail.image!);
|
images.add(productDetail.image!);
|
||||||
for (var i = 0; i < productDetail.images!.length; i++) {
|
for (var i = 0; i < productDetail.images!.length; i++) {
|
||||||
// print('>>https:' + productDetail.images[i].image);
|
// print('>>https:' + productDetail.images[i].image);
|
||||||
images.add(productDetail.images![i].image);
|
images.add(productDetail.images![i].image!);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < images.length; i++) {
|
for (var i = 0; i < images.length; i++) {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ class ShopState extends State<Shop> {
|
|||||||
.map((i) => CategoryProducts.fromJson(i))
|
.map((i) => CategoryProducts.fromJson(i))
|
||||||
.toList();
|
.toList();
|
||||||
if (categoryId == 0 && displayProductByCategoryClick) {
|
if (categoryId == 0 && displayProductByCategoryClick) {
|
||||||
categoryId = _categoryProducts[0].id;
|
categoryId = _categoryProducts[0].id!;
|
||||||
}
|
}
|
||||||
data = value;
|
data = value;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ class ShopProductsState extends State<ShopProducts> {
|
|||||||
}
|
}
|
||||||
displayProductByCategoryClickIndicator = '';
|
displayProductByCategoryClickIndicator = '';
|
||||||
if (categoryId == 0 && displayProductByCategoryClick) {
|
if (categoryId == 0 && displayProductByCategoryClick) {
|
||||||
categoryId = _categoryProducts[0].id;
|
categoryId = _categoryProducts[0].id!;
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ class ShopPromoteState extends State<ShopPromote> {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Util.showImage(
|
child: Util.showImage(
|
||||||
_business.promoProducts![i].imagePath,
|
_business.promoProducts![i].imagePath!,
|
||||||
width: 120.0,
|
width: 120.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -139,7 +139,7 @@ class ShopPromoteState extends State<ShopPromote> {
|
|||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
_business.promoProducts![i].name,
|
_business.promoProducts![i].name!,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(fontSize: 14.0),
|
style: TextStyle(fontSize: 14.0),
|
||||||
@@ -149,7 +149,7 @@ class ShopPromoteState extends State<ShopPromote> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ShowPrice(
|
ShowPrice(
|
||||||
_business.promoProducts![i].price,
|
_business.promoProducts![i].price!,
|
||||||
currencySign: '\$',
|
currencySign: '\$',
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
smallFontSize: 15,
|
smallFontSize: 15,
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
|||||||
|
|
||||||
void _removeCartLineItem() {
|
void _removeCartLineItem() {
|
||||||
if (cartInfo.productList![widget.cartLineItemIndex].quantity! <= 1) {
|
if (cartInfo.productList![widget.cartLineItemIndex].quantity! <= 1) {
|
||||||
String uuid = cartInfo.productList![widget.cartLineItemIndex].uuid;
|
String uuid = cartInfo.productList![widget.cartLineItemIndex].uuid!;
|
||||||
cartInfo.productList!.removeAt(widget.cartLineItemIndex);
|
cartInfo.productList!.removeAt(widget.cartLineItemIndex);
|
||||||
Utils.removeSubproduct(cartInfo, uuid);
|
Utils.removeSubproduct(cartInfo, uuid);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Text(
|
new Text(
|
||||||
S.of(context).check_option_select_token(product.productAttributes![this.index].name),
|
S.of(context).check_option_select_token(product.productAttributes![this.index].name!),
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 12.5,
|
fontSize: 12.5,
|
||||||
),
|
),
|
||||||
@@ -95,7 +95,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
|||||||
'adjust_amount': adjustAmount
|
'adjust_amount': adjustAmount
|
||||||
};
|
};
|
||||||
var cloneSelections = json.decode(json.encode(selections));
|
var cloneSelections = json.decode(json.encode(selections));
|
||||||
int idx = Utils.selectionsContains(cloneSelections, product.productAttributes![index].name, name);
|
int idx = Utils.selectionsContains(cloneSelections, product.productAttributes![index].name!, name);
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
(cloneSelections[product.productAttributes![index].name!.toUpperCase()] as List).removeAt(idx);
|
(cloneSelections[product.productAttributes![index].name!.toUpperCase()] as List).removeAt(idx);
|
||||||
} else if (cloneSelections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
|
} else if (cloneSelections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
|
||||||
@@ -108,7 +108,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
|||||||
cloneSelections.remove(product.productAttributes![index].name!.toUpperCase());
|
cloneSelections.remove(product.productAttributes![index].name!.toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
setOptionsStateDisabled(product.productAttributes![index].name, false);
|
setOptionsStateDisabled(product.productAttributes![index].name!, false);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
selections = cloneSelections;
|
selections = cloneSelections;
|
||||||
@@ -121,14 +121,14 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
|||||||
children: <Widget>[],
|
children: <Widget>[],
|
||||||
);
|
);
|
||||||
|
|
||||||
List<ProductOption> productOptions = product.productAttributes![index].productOptions;
|
List<ProductOption> productOptions = product.productAttributes![index].productOptions!;
|
||||||
|
|
||||||
if (!optionsState.containsKey(product.productAttributes![index].name)) {
|
if (!optionsState.containsKey(product.productAttributes![index].name)) {
|
||||||
List<Map<String, dynamic>> optionState = [];
|
List<Map<String, dynamic>> optionState = [];
|
||||||
for (var i = 0; i < productOptions.length; i++) {
|
for (var i = 0; i < productOptions.length; i++) {
|
||||||
optionState.add({'name': product.productAttributes![index].productOptions![i].name, 'disabled': false, 'check': false});
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
|
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
|
||||||
@@ -199,7 +199,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
|||||||
} else {
|
} else {
|
||||||
if (_checkOptionIsCheck(productOptions[i].name!)) {
|
if (_checkOptionIsCheck(productOptions[i].name!)) {
|
||||||
setOptionsStateDisabled(
|
setOptionsStateDisabled(
|
||||||
product.productAttributes![index].name, true);
|
product.productAttributes![index].name!, true);
|
||||||
optionsState[product.productAttributes![index]
|
optionsState[product.productAttributes![index]
|
||||||
.name][i]['disabled'] = false;
|
.name][i]['disabled'] = false;
|
||||||
break;
|
break;
|
||||||
@@ -232,16 +232,16 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void disableOptionIfNotSelected() {
|
void disableOptionIfNotSelected() {
|
||||||
setOptionsStateDisabled(product.productAttributes![index].name, true);
|
setOptionsStateDisabled(product.productAttributes![index].name!, true);
|
||||||
for (var i = 0; i < optionsState[product.productAttributes![index].name].length; i++) {
|
for (var i = 0; i < optionsState[product.productAttributes![index].name].length; i++) {
|
||||||
if (Utils.selectionsContains(selections, product.productAttributes![index].name, optionsState[product.productAttributes![index].name][i]['name']) != -1) {
|
if (Utils.selectionsContains(selections, product.productAttributes![index].name!, optionsState[product.productAttributes![index].name][i]['name']) != -1) {
|
||||||
optionsState[product.productAttributes![index].name][i]['disabled'] = false;
|
optionsState[product.productAttributes![index].name][i]['disabled'] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _checkOptionIsCheck(String name) {
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Text(
|
new Text(
|
||||||
S.of(context).check_option_select_token(product.productAttributes![this.index].name),
|
S.of(context).check_option_select_token(product.productAttributes![this.index].name!),
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 12.5,
|
fontSize: 12.5,
|
||||||
),
|
),
|
||||||
@@ -86,7 +86,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
|||||||
'adjust_amount': adjustAmount
|
'adjust_amount': adjustAmount
|
||||||
};
|
};
|
||||||
var cloneSelections = json.decode(json.encode(selections));
|
var cloneSelections = json.decode(json.encode(selections));
|
||||||
int idx = Utils.selectionsContains(cloneSelections, product.productAttributes![index].name, name);
|
int idx = Utils.selectionsContains(cloneSelections, product.productAttributes![index].name!, name);
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
if (quantity == 1) {
|
if (quantity == 1) {
|
||||||
cloneSelections[product.productAttributes![index].name!.toUpperCase()][idx]['quantity'] += 1;
|
cloneSelections[product.productAttributes![index].name!.toUpperCase()][idx]['quantity'] += 1;
|
||||||
@@ -112,7 +112,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
|||||||
cloneSelections.remove(product.productAttributes![index].name!.toUpperCase());
|
cloneSelections.remove(product.productAttributes![index].name!.toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
setOptionsStateDisabled(product.productAttributes![index].name, false);
|
setOptionsStateDisabled(product.productAttributes![index].name!, false);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
selections = cloneSelections;
|
selections = cloneSelections;
|
||||||
@@ -125,19 +125,19 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
|||||||
children: <Widget>[],
|
children: <Widget>[],
|
||||||
);
|
);
|
||||||
|
|
||||||
List<ProductOption> productOptions = product.productAttributes![index].productOptions;
|
List<ProductOption> productOptions = product.productAttributes![index].productOptions!;
|
||||||
|
|
||||||
if (!optionsState.containsKey(product.productAttributes![index].name)) {
|
if (!optionsState.containsKey(product.productAttributes![index].name)) {
|
||||||
List<Map<String, dynamic>> optionState = [];
|
List<Map<String, dynamic>> optionState = [];
|
||||||
for (var i = 0; i < productOptions.length; i++) {
|
for (var i = 0; i < productOptions.length; i++) {
|
||||||
int qty = 0;
|
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) {
|
if (idx != -1) {
|
||||||
qty = selections[product.productAttributes![index].name!.toUpperCase()][idx]['quantity'];
|
qty = selections[product.productAttributes![index].name!.toUpperCase()][idx]['quantity'];
|
||||||
}
|
}
|
||||||
optionState.add({'name': product.productAttributes![index].productOptions![i].name, 'disabled': false, 'quantity': qty, 'check': false});
|
optionState.add({'name': product.productAttributes![index].productOptions![i].name, 'disabled': false, 'quantity': qty, 'check': false});
|
||||||
}
|
}
|
||||||
optionsState[product.productAttributes![index].name] = optionState;
|
optionsState[product.productAttributes![index].name!] = optionState;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
|
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
|
||||||
@@ -207,7 +207,7 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
|||||||
} else {
|
} else {
|
||||||
if (_checkOptionIsCheck(productOptions[i].name!)) {
|
if (_checkOptionIsCheck(productOptions[i].name!)) {
|
||||||
setOptionsStateDisabled(
|
setOptionsStateDisabled(
|
||||||
product.productAttributes![index].name, true);
|
product.productAttributes![index].name!, true);
|
||||||
optionsState[product.productAttributes![index]
|
optionsState[product.productAttributes![index]
|
||||||
.name][i]['disabled'] = false;
|
.name][i]['disabled'] = false;
|
||||||
break;
|
break;
|
||||||
@@ -240,16 +240,16 @@ class QtyOptionsState extends OptionsBaseState<QtyOptions> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void disableOptionIfNotSelected() {
|
void disableOptionIfNotSelected() {
|
||||||
setOptionsStateDisabled(product.productAttributes![index].name, true);
|
setOptionsStateDisabled(product.productAttributes![index].name!, true);
|
||||||
for (var i = 0; i < optionsState[product.productAttributes![index].name].length; i++) {
|
for (var i = 0; i < optionsState[product.productAttributes![index].name].length; i++) {
|
||||||
if (Utils.selectionsContains(selections, product.productAttributes![index].name, optionsState[product.productAttributes![index].name][i]['name']) != -1) {
|
if (Utils.selectionsContains(selections, product.productAttributes![index].name!, optionsState[product.productAttributes![index].name][i]['name']) != -1) {
|
||||||
optionsState[product.productAttributes![index].name][i]['disabled'] = false;
|
optionsState[product.productAttributes![index].name][i]['disabled'] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _checkOptionIsCheck(String name) {
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Text(
|
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(
|
style: new TextStyle(
|
||||||
fontSize: 12.5,
|
fontSize: 12.5,
|
||||||
),
|
),
|
||||||
@@ -102,7 +102,7 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
|||||||
extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
|
extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
|
||||||
if (exclusiveRule != null) {
|
if (exclusiveRule != null) {
|
||||||
if (_checkOptionIsCheck(productOption.name!)) {
|
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>[],
|
children: <Widget>[],
|
||||||
);
|
);
|
||||||
|
|
||||||
List<ProductOption> productOptions = product.productAttributes![index].productOptions;
|
List<ProductOption> productOptions = product.productAttributes![index].productOptions!;
|
||||||
|
|
||||||
if (!optionsState.containsKey(product.productAttributes![index].name)) {
|
if (!optionsState.containsKey(product.productAttributes![index].name)) {
|
||||||
List<Map<String, dynamic>> optionState = [];
|
List<Map<String, dynamic>> optionState = [];
|
||||||
for (var i = 0; i < productOptions.length; i++) {
|
for (var i = 0; i < productOptions.length; i++) {
|
||||||
optionState.add({'name': product.productAttributes![index].productOptions![i].name, 'disabled': false, 'check': false});
|
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++) {
|
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) {
|
if (extraJson != null) {
|
||||||
Map<String, dynamic> exclusiveRule = Rule.getRule(
|
Map<String, dynamic> exclusiveRule = Rule.getRule(
|
||||||
extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
|
extraJson, Rule.RULE_EXCLUSIVE_SELECTION);
|
||||||
if (exclusiveRule != null) {
|
if (exclusiveRule != null) {
|
||||||
if (_checkOptionIsCheck(productOptions[i].name!)) {
|
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;
|
optionsState[product.productAttributes![index].name][i]['disabled'] = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ class RadioOptionsState extends OptionsBaseState<RadioOptions> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool _checkOptionIsCheck(String name) {
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -732,7 +732,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
|||||||
subtotal = 0.0;
|
subtotal = 0.0;
|
||||||
|
|
||||||
for (var i = 0; i < cartInfo.productList!.length; i++) {
|
for (var i = 0; i < cartInfo.productList!.length; i++) {
|
||||||
subtotal += cartInfo.productList![i].totalPrice;
|
subtotal += cartInfo.productList![i].totalPrice!;
|
||||||
column.children.add(lineItem(cartInfo.productList![i]));
|
column.children.add(lineItem(cartInfo.productList![i]));
|
||||||
}
|
}
|
||||||
column.children.add(GestureDetector(
|
column.children.add(GestureDetector(
|
||||||
@@ -838,7 +838,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
|||||||
Container(
|
Container(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
child: Text(
|
child: Text(
|
||||||
S.of(context).extra_fee_token(cartInfo.extraFeeList![i].name, cartInfo.extraFeeList![i].rate),
|
S.of(context).extra_fee_token(cartInfo.extraFeeList![i].name!, cartInfo.extraFeeList![i].rate!),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
@@ -1317,7 +1317,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0, bottom: 12.0),
|
padding: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0, bottom: 12.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
bookingDateTime.bookTimes![position].viewTime,
|
bookingDateTime.bookTimes![position].viewTime!,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
@@ -1932,7 +1932,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
for (int i = 0; i < cartInfo.businessInfo!.quickInputs!.length; i++) {
|
for (int i = 0; i < cartInfo.businessInfo!.quickInputs!.length; i++) {
|
||||||
String qi = cartInfo.businessInfo!.quickInputs![i].value;
|
String qi = cartInfo.businessInfo!.quickInputs![i].value!;
|
||||||
w.children.add(TextButton(
|
w.children.add(TextButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
qi,
|
qi,
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class MobileOrdersState extends State<MobileOrders> with SingleTickerProviderSta
|
|||||||
row.children.add(Expanded(
|
row.children.add(Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
order.cartInfo!.productList![0].name,
|
order.cartInfo!.productList![0].name!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
|
|||||||
images.add(productDetail.image!);
|
images.add(productDetail.image!);
|
||||||
for (var i = 0; i < productDetail.images!.length; i++) {
|
for (var i = 0; i < productDetail.images!.length; i++) {
|
||||||
// print('>>https:' + productDetail.images[i].image);
|
// print('>>https:' + productDetail.images[i].image);
|
||||||
images.add(productDetail.images![i].image);
|
images.add(productDetail.images![i].image!);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < images.length; i++) {
|
for (var i = 0; i < images.length; i++) {
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class ShopState extends State<Shop>
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Util.showImage(
|
child: Util.showImage(
|
||||||
_business.promoProducts![i].imagePath,
|
_business.promoProducts![i].imagePath!,
|
||||||
width: 110.0,
|
width: 110.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -296,7 +296,7 @@ class ShopState extends State<Shop>
|
|||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
_business.promoProducts![i].name,
|
_business.promoProducts![i].name!,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(fontSize: 14.0),
|
style: TextStyle(fontSize: 14.0),
|
||||||
@@ -306,7 +306,7 @@ class ShopState extends State<Shop>
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ShowPrice(
|
ShowPrice(
|
||||||
_business.promoProducts![i].price,
|
_business.promoProducts![i].price!,
|
||||||
currencySign: '\$',
|
currencySign: '\$',
|
||||||
regularPrice: _business.promoProducts![i].regularPrice,
|
regularPrice: _business.promoProducts![i].regularPrice,
|
||||||
),
|
),
|
||||||
@@ -1102,7 +1102,7 @@ class ShopState extends State<Shop>
|
|||||||
pages.add(new GestureDetector(
|
pages.add(new GestureDetector(
|
||||||
child: new Container(
|
child: new Container(
|
||||||
child: Util.showImage(
|
child: Util.showImage(
|
||||||
_business.slideImages![i].imageUrl,
|
_business.slideImages![i].imageUrl!,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -1214,7 +1214,7 @@ class ShopState extends State<Shop>
|
|||||||
|
|
||||||
void _selectCategory(int index) {
|
void _selectCategory(int index) {
|
||||||
if (displayProductByCategoryClick && _categoryProducts[index].id! > 0) {
|
if (displayProductByCategoryClick && _categoryProducts[index].id! > 0) {
|
||||||
categoryId = _categoryProducts[index].id;
|
categoryId = _categoryProducts[index].id!;
|
||||||
loadProducts();
|
loadProducts();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ def insert_arg_bang(line, col0):
|
|||||||
if not val: return None
|
if not val: return None
|
||||||
if val[0] in '0123456789"\'': return None # 字面量跳过
|
if val[0] in '0123456789"\'': return None # 字面量跳过
|
||||||
if val in ('true','false','null'): return None
|
if val in ('true','false','null'): return None
|
||||||
if not re.fullmatch(r'[\w.\[\()!]+', val): return None # 含运算符/空格跳过
|
if not re.fullmatch(r'[\w.\[\]()!]+', val): return None # 含运算符/空格跳过
|
||||||
return line[:j+1]+'!'+line[j+1:]
|
return line[:j+1]+'!'+line[j+1:]
|
||||||
|
|
||||||
def make_field_nullable(lines, name):
|
def make_field_nullable(lines, name):
|
||||||
|
|||||||
Reference in New Issue
Block a user