showUserList static method

dynamic showUserList(
  1. BuildContext context,
  2. String liveId,
  3. String anchorId, {
  4. OnUserPressed? onTap,
})

直播间在线用户列表 liveId:直播间ID anchorId:主播ID

Implementation

static showUserList(BuildContext context, String liveId, String anchorId, {OnUserPressed? onTap}) {
  JJDialogController(
    barrierColor: Colors.transparent,
    child: JJUserList(
      liveId: liveId,
      height: DoubleValue.screenHeight / 2,
      clipBehavior: Clip.antiAlias,
      decoration: BoxDecoration(color: Colors.black.withAlpha(180), borderRadius: const BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24))),
      onTap: (userId) {
        Navigator.pop(context);

        ///打开用户卡片
        LiveDialogUtils.showBusinessCardDialog(context: context, userId: userId, anchorUserId: anchorId);
      },
    ),
  ).show(context);
}