fix: 动态ADDITIONAL_TYPE_RESERVE异常
This commit is contained in:
@ -83,45 +83,53 @@ Widget addWidget(item, context, type, {floor = 1}) {
|
|||||||
);
|
);
|
||||||
case 'ADDITIONAL_TYPE_RESERVE':
|
case 'ADDITIONAL_TYPE_RESERVE':
|
||||||
return dynamicProperty[type].state != -1
|
return dynamicProperty[type].state != -1
|
||||||
? Padding(
|
? dynamicProperty[type].title != null
|
||||||
padding: const EdgeInsets.only(top: 8),
|
? Padding(
|
||||||
child: InkWell(
|
padding: const EdgeInsets.only(top: 8),
|
||||||
onTap: () {},
|
child: InkWell(
|
||||||
child: Container(
|
onTap: () {},
|
||||||
width: double.infinity,
|
child: Container(
|
||||||
padding: const EdgeInsets.only(
|
width: double.infinity,
|
||||||
left: 12, top: 10, right: 12, bottom: 10),
|
padding: const EdgeInsets.only(
|
||||||
color: bgColor,
|
left: 12, top: 10, right: 12, bottom: 10),
|
||||||
child: Column(
|
color: bgColor,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Text(
|
children: [
|
||||||
dynamicProperty[type].title,
|
Text(
|
||||||
maxLines: 1,
|
dynamicProperty[type].title,
|
||||||
overflow: TextOverflow.ellipsis,
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 1),
|
||||||
|
Text.rich(
|
||||||
|
TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.outline,
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelMedium!
|
||||||
|
.fontSize),
|
||||||
|
children: [
|
||||||
|
if (dynamicProperty[type].desc1 != null)
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
dynamicProperty[type].desc1['text']),
|
||||||
|
const TextSpan(text: ' '),
|
||||||
|
if (dynamicProperty[type].desc2 != null)
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
dynamicProperty[type].desc2['text']),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 1),
|
// TextButton(onPressed: () {}, child: Text('123'))
|
||||||
Text.rich(
|
),
|
||||||
TextSpan(
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).colorScheme.outline,
|
|
||||||
fontSize: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.labelMedium!
|
|
||||||
.fontSize),
|
|
||||||
children: [
|
|
||||||
TextSpan(text: dynamicProperty[type].desc1['text']),
|
|
||||||
const TextSpan(text: ' '),
|
|
||||||
TextSpan(text: dynamicProperty[type].desc2['text']),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
// TextButton(onPressed: () {}, child: Text('123'))
|
)
|
||||||
),
|
: const SizedBox()
|
||||||
),
|
|
||||||
)
|
|
||||||
: const SizedBox();
|
: const SizedBox();
|
||||||
case 'ADDITIONAL_TYPE_GOODS':
|
case 'ADDITIONAL_TYPE_GOODS':
|
||||||
return Padding(
|
return Padding(
|
||||||
|
|||||||
Reference in New Issue
Block a user