feat: 搜索结果跳转直播

This commit is contained in:
guozhigq
2023-08-07 16:43:57 +08:00
parent d46cff80e1
commit 8aac1dd714
5 changed files with 74 additions and 60 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:pilipala/common/constants.dart';
import 'package:pilipala/common/widgets/network_img_layer.dart';
import 'package:pilipala/utils/utils.dart';
@ -32,6 +33,7 @@ class LiveItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
String heroTag = Utils.makeHeroTag(liveItem.roomid);
return Card(
elevation: 0,
clipBehavior: Clip.hardEdge,
@ -40,7 +42,10 @@ class LiveItem extends StatelessWidget {
),
margin: EdgeInsets.zero,
child: InkWell(
onTap: () {},
onTap: () async {
Get.toNamed('/liveRoom?roomid=${liveItem.roomid}',
arguments: {'liveItem': liveItem, 'heroTag': heroTag});
},
child: Column(
children: [
ClipRRect(
@ -58,7 +63,7 @@ class LiveItem extends StatelessWidget {
return Stack(
children: [
Hero(
tag: Utils.makeHeroTag(liveItem.roomid),
tag: heroTag,
child: NetworkImgLayer(
src: liveItem.cover,
type: 'emote',