mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom show dyn decorate
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -126,6 +126,56 @@ class AuthorPanel extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (item.modules.moduleAuthor.decorate != null)
|
||||
GestureDetector(
|
||||
onTap: item.modules.moduleAuthor.decorate['jump_url'] != null
|
||||
? () {
|
||||
Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'url':
|
||||
'${item.modules.moduleAuthor.decorate['jump_url']}'
|
||||
},
|
||||
);
|
||||
}
|
||||
: null,
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.centerRight,
|
||||
children: [
|
||||
Image.network(
|
||||
height: 32,
|
||||
item.modules.moduleAuthor.decorate['card_url'],
|
||||
),
|
||||
if ((item.modules.moduleAuthor.decorate?['fan']?['num_str']
|
||||
as String?)
|
||||
?.isNotEmpty ==
|
||||
true)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 32),
|
||||
child: Text(
|
||||
'${item.modules.moduleAuthor.decorate['fan']['num_str']}',
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
fontFamily: 'digital_id_num',
|
||||
color: (item.modules.moduleAuthor.decorate?['fan']
|
||||
?['color'] as String?)
|
||||
?.startsWith('#') ==
|
||||
true
|
||||
? Color(
|
||||
int.parse(
|
||||
item.modules.moduleAuthor
|
||||
.decorate['fan']['color']
|
||||
.replaceFirst('#', '0xFF'),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 32,
|
||||
height: 32,
|
||||
|
||||
Reference in New Issue
Block a user