mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
67 lines
1.8 KiB
Dart
67 lines
1.8 KiB
Dart
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
|
import 'package:PiliPlus/models/live/live_search/user_item.dart';
|
|
import 'package:PiliPlus/utils/utils.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
class LiveSearchUserItem extends StatelessWidget {
|
|
const LiveSearchUserItem({
|
|
super.key,
|
|
required this.item,
|
|
});
|
|
|
|
final LiveSearchUserItemModel item;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
final style = TextStyle(
|
|
fontSize: 13,
|
|
color: theme.colorScheme.outline,
|
|
);
|
|
return InkWell(
|
|
onTap: () => Get.toNamed(
|
|
'/liveRoom?roomid=${item.roomid}',
|
|
),
|
|
child: Row(
|
|
children: [
|
|
const SizedBox(width: 15),
|
|
NetworkImgLayer(
|
|
src: item.face,
|
|
width: 42,
|
|
height: 42,
|
|
type: 'avatar',
|
|
),
|
|
const SizedBox(width: 10),
|
|
Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Text(
|
|
item.name!,
|
|
style: const TextStyle(
|
|
fontSize: 14,
|
|
),
|
|
),
|
|
if (item.liveStatus == 1) ...[
|
|
const SizedBox(width: 10),
|
|
Image.asset(height: 14, 'assets/images/live/live.gif'),
|
|
],
|
|
],
|
|
),
|
|
const SizedBox(height: 2),
|
|
Text(
|
|
'分区: ${item.areaName ?? ''} 关注数: ${Utils.numFormat(item.fansNum ?? 0)}',
|
|
style: style,
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|