feat: search user by uid

This commit is contained in:
guozhigq
2024-10-26 16:31:01 +08:00
parent baa6a644e3
commit 4f6ac4aff4
4 changed files with 83 additions and 40 deletions

View File

@ -13,10 +13,10 @@ Widget searchUserPanel(BuildContext context, ctr, list) {
controller: ctr!.scrollController,
addAutomaticKeepAlives: false,
addRepaintBoundaries: false,
itemCount: list!.length,
itemCount: list.length,
itemBuilder: (context, index) {
var i = list![index];
String heroTag = Utils.makeHeroTag(i!.mid);
var i = list[index];
String heroTag = Utils.makeHeroTag(i.mid);
return InkWell(
onTap: () => Get.toNamed('/member?mid=${i.mid}',
arguments: {'heroTag': heroTag, 'face': i.upic}),
@ -43,7 +43,7 @@ Widget searchUserPanel(BuildContext context, ctr, list) {
Row(
children: [
Text(
i!.uname,
i.uname!,
style: const TextStyle(
fontSize: 14,
),
@ -55,15 +55,16 @@ Widget searchUserPanel(BuildContext context, ctr, list) {
),
],
),
Row(
children: [
Text('粉丝:${i.fans} ', style: style),
Text(' 视频${i.videos}', style: style)
],
),
if (i.officialVerify['desc'] != '')
if (i.fans != null && i.videos != null)
Row(
children: [
Text('粉丝${i.fans} ', style: style),
Text(' 视频:${i.videos}', style: style)
],
),
if (i.officialVerify!['desc'] != '')
Text(
i.officialVerify['desc'],
i.officialVerify!['desc'],
style: style,
),
],