mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-27 12:36:27 +08:00
feat: at user
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
41
lib/pages/dynamics_mention/widgets/item.dart
Normal file
41
lib/pages/dynamics_mention/widgets/item.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_mention/item.dart';
|
||||
import 'package:PiliPlus/utils/num_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DynMentionItem extends StatelessWidget {
|
||||
const DynMentionItem({
|
||||
super.key,
|
||||
required this.item,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
final MentionItem item;
|
||||
final ValueChanged<MentionItem> onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
type: MaterialType.transparency,
|
||||
child: ListTile(
|
||||
dense: true,
|
||||
onTap: () => onTap(item),
|
||||
leading: NetworkImgLayer(
|
||||
src: item.face,
|
||||
width: 42,
|
||||
height: 42,
|
||||
type: ImageType.avatar,
|
||||
),
|
||||
title: Text(
|
||||
item.name!,
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
subtitle: Text(
|
||||
'${NumUtil.numFormat(item.fans)}粉丝',
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.outline),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user