Merge branch 'design'
This commit is contained in:
@ -521,6 +521,7 @@ class SystemNotice extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Map content = item.content ?? '';
|
Map content = item.content ?? '';
|
||||||
|
Color primary = Theme.of(context).colorScheme.primary;
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
@ -557,12 +558,35 @@ class SystemNotice extends StatelessWidget {
|
|||||||
.labelSmall!
|
.labelSmall!
|
||||||
.copyWith(color: Theme.of(context).colorScheme.outline),
|
.copyWith(color: Theme.of(context).colorScheme.outline),
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(color: primary.withOpacity(0.05)),
|
||||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.05),
|
SelectableText(content['text']),
|
||||||
),
|
if (content['jump_text'] != null &&
|
||||||
SelectableText(
|
content['jump_uri'] != null) ...[
|
||||||
content['text'],
|
Divider(color: primary.withOpacity(0.05)),
|
||||||
)
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Get.toNamed('/webview', parameters: {
|
||||||
|
'url': content['jump_uri'],
|
||||||
|
'type': 'url',
|
||||||
|
'pageTitle': content['jump_text'] == ''
|
||||||
|
? '查看详情'
|
||||||
|
: content['jump_text'],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
style: ButtonStyle(
|
||||||
|
backgroundColor:
|
||||||
|
MaterialStateProperty.resolveWith((states) {
|
||||||
|
return primary.withAlpha(20);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
child: Text(content['jump_text'] == ''
|
||||||
|
? '查看详情'
|
||||||
|
: content['jump_text']),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user