fix: 动态ADDITIONAL_TYPE_RESERVE异常

This commit is contained in:
guozhigq
2023-10-15 16:49:20 +08:00
parent 76974bd874
commit 4d5f3eb14a

View File

@ -83,6 +83,7 @@ Widget addWidget(item, context, type, {floor = 1}) {
);
case 'ADDITIONAL_TYPE_RESERVE':
return dynamicProperty[type].state != -1
? dynamicProperty[type].title != null
? Padding(
padding: const EdgeInsets.only(top: 8),
child: InkWell(
@ -110,9 +111,15 @@ Widget addWidget(item, context, type, {floor = 1}) {
.labelMedium!
.fontSize),
children: [
TextSpan(text: dynamicProperty[type].desc1['text']),
if (dynamicProperty[type].desc1 != null)
TextSpan(
text:
dynamicProperty[type].desc1['text']),
const TextSpan(text: ' '),
TextSpan(text: dynamicProperty[type].desc2['text']),
if (dynamicProperty[type].desc2 != null)
TextSpan(
text:
dynamicProperty[type].desc2['text']),
],
),
)
@ -122,6 +129,7 @@ Widget addWidget(item, context, type, {floor = 1}) {
),
),
)
: const SizedBox()
: const SizedBox();
case 'ADDITIONAL_TYPE_GOODS':
return Padding(