mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
opt ui
opt video keyboard event opt code Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/common/widgets/pendant_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/follow/list.dart';
|
||||
import 'package:PiliPlus/pages/share/view.dart' show UserModel;
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
@@ -23,10 +22,10 @@ class FollowItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final colorScheme = ColorScheme.of(context);
|
||||
return Material(
|
||||
type: MaterialType.transparency,
|
||||
child: ListTile(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (onSelect != null) {
|
||||
onSelect!.call(
|
||||
@@ -41,74 +40,72 @@ class FollowItem extends StatelessWidget {
|
||||
Get.toNamed('/member?mid=${item.mid}');
|
||||
}
|
||||
},
|
||||
leading: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
NetworkImgLayer(
|
||||
width: 45,
|
||||
height: 45,
|
||||
type: ImageType.avatar,
|
||||
src: item.face,
|
||||
),
|
||||
if (item.officialVerify?.type == 0 ||
|
||||
item.officialVerify?.type == 1)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: theme.colorScheme.surface,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.offline_bolt,
|
||||
color: item.officialVerify?.type == 0
|
||||
? const Color(0xFFFFCC00)
|
||||
: Colors.lightBlueAccent,
|
||||
size: 14,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 10,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
PendantAvatar(
|
||||
size: 45,
|
||||
badgeSize: 14,
|
||||
avatar: item.face,
|
||||
officialType: item.officialVerify?.type,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
spacing: 3,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.uname!,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
if (item.sign != null)
|
||||
Text(
|
||||
item.sign!,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
title: Text(
|
||||
item.uname!,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
subtitle: Text(
|
||||
item.sign!,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
dense: true,
|
||||
trailing: isOwner == true
|
||||
? SizedBox(
|
||||
height: 34,
|
||||
child: FilledButton.tonal(
|
||||
onPressed: () => RequestUtils.actionRelationMod(
|
||||
context: context,
|
||||
mid: item.mid,
|
||||
isFollow: item.attribute != -1,
|
||||
callback: callback,
|
||||
),
|
||||
style: FilledButton.styleFrom(
|
||||
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
|
||||
foregroundColor: item.attribute == -1
|
||||
? null
|
||||
: theme.colorScheme.outline,
|
||||
backgroundColor: item.attribute == -1
|
||||
? null
|
||||
: theme.colorScheme.onInverseSurface,
|
||||
),
|
||||
child: Text(
|
||||
'${item.attribute == -1 ? '' : '已'}关注',
|
||||
style: const TextStyle(fontSize: 12),
|
||||
if (isOwner ?? false)
|
||||
SizedBox(
|
||||
height: 34,
|
||||
child: FilledButton.tonal(
|
||||
onPressed: () => RequestUtils.actionRelationMod(
|
||||
context: context,
|
||||
mid: item.mid,
|
||||
isFollow: item.attribute != -1,
|
||||
callback: callback,
|
||||
),
|
||||
style: FilledButton.styleFrom(
|
||||
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
|
||||
foregroundColor: item.attribute == -1
|
||||
? null
|
||||
: colorScheme.outline,
|
||||
backgroundColor: item.attribute == -1
|
||||
? null
|
||||
: colorScheme.onInverseSurface,
|
||||
),
|
||||
child: Text(
|
||||
'${item.attribute == -1 ? '' : '已'}关注',
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user