mod: 用户页跳转&样式修改

This commit is contained in:
guozhigq
2023-07-14 22:44:21 +08:00
parent 8fd1efd8bf
commit b7083fdc15
17 changed files with 764 additions and 227 deletions

View File

@ -1,20 +1,29 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:pilipala/common/widgets/network_img_layer.dart';
import 'package:pilipala/utils/utils.dart';
Widget author(item, context) {
String heroTag = Utils.makeHeroTag(item.modules.moduleAuthor.mid);
return Container(
padding: const EdgeInsets.fromLTRB(12, 12, 12, 8),
child: Row(
children: [
GestureDetector(
onTap: () =>
Get.toNamed('/member?mid=${item.modules.moduleAuthor.mid}'),
child: NetworkImgLayer(
width: 40,
height: 40,
type: 'avatar',
src: item.modules.moduleAuthor.face,
onTap: () => Get.toNamed(
'/member?mid=${item.modules.moduleAuthor.mid}',
arguments: {
'face': item.modules.moduleAuthor.face,
'heroTag': heroTag
}),
child: Hero(
tag: heroTag,
child: NetworkImgLayer(
width: 40,
height: 40,
type: 'avatar',
src: item.modules.moduleAuthor.face,
),
),
),
const SizedBox(width: 10),

View File

@ -174,12 +174,13 @@ class _UpPanelState extends State<UpPanel> {
Badge(
smallSize: 8,
label: data.type == 'live' ? const Text('Live') : null,
textColor: Theme.of(context).colorScheme.onPrimary,
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
alignment: AlignmentDirectional.bottomCenter,
padding: const EdgeInsets.only(left: 4, right: 4),
padding: const EdgeInsets.only(left: 6, right: 6),
isLabelVisible: data.type == 'live' ||
(data.type == 'up' && (data.hasUpdate ?? false)),
backgroundColor: Theme.of(context).primaryColor,
backgroundColor:
Theme.of(context).colorScheme.secondaryContainer,
child: NetworkImgLayer(
width: 49,
height: 49,