logo和名称替换
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/images.dart';
|
||||
import 'package:hgmj/hj_page/live/live_item_widget.dart';
|
||||
import 'package:hgmj/hj_page/live/live_model.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:hgmj/hj_utils/sliver_delegate.dart';
|
||||
import 'package:hgmj/tools_base/banner/ads_grid_view.dart';
|
||||
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
|
||||
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
|
||||
import 'package:wydj/assets_tool/images.dart';
|
||||
import 'package:wydj/hj_page/live/live_item_widget.dart';
|
||||
import 'package:wydj/hj_page/live/live_model.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
import 'package:wydj/hj_utils/sliver_delegate.dart';
|
||||
import 'package:wydj/tools_base/banner/ads_grid_view.dart';
|
||||
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
|
||||
import 'package:wydj/tools_base/widget/net_image_widget.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
||||
import '../video/video_full_page.dart';
|
||||
@@ -54,7 +54,9 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
delegate: MySliverDelegate(
|
||||
forceRefresh: true,
|
||||
maxHeight: Get.width / (logic.aspectRatio ?? 1),
|
||||
minHeight: logic.isVerticalVideo ? Get.width / (logic.aspectRatio ?? 1) : Get.height / 3 - 60,
|
||||
minHeight: logic.isVerticalVideo
|
||||
? Get.width / (logic.aspectRatio ?? 1)
|
||||
: Get.height / 3 - 60,
|
||||
child: ClipRRect(
|
||||
//部分机型会超出比例,裁剪掉多余部分
|
||||
child: Container(color: Colors.black, child: _buildPlayer()),
|
||||
@@ -70,7 +72,10 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
padding: const EdgeInsets.fromLTRB(16, 18, 16, 12),
|
||||
child: const Text(
|
||||
'精彩推荐',
|
||||
style: TextStyle(fontSize: 16, color: Colors.white, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -91,7 +96,8 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
children: [
|
||||
if (logic.loadingUserInfo) ...[
|
||||
//1.加载用户直播权益信息
|
||||
AspectRatio(aspectRatio: logic.aspectRatio ?? 1, child: _buildCover(logic)),
|
||||
AspectRatio(
|
||||
aspectRatio: logic.aspectRatio ?? 1, child: _buildCover(logic)),
|
||||
const LoadingCenterWidget(),
|
||||
] else if (!logic.canWatchLive) ...[
|
||||
//2.无权限
|
||||
@@ -105,7 +111,9 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
tag: 'player',
|
||||
child: AspectRatio(
|
||||
aspectRatio: logic.aspectRatio ?? 1,
|
||||
child: logic.initedVideoController ? VideoPlayer(logic.playerController!) : _buildCover(logic),
|
||||
child: logic.initedVideoController
|
||||
? VideoPlayer(logic.playerController!)
|
||||
: _buildCover(logic),
|
||||
),
|
||||
),
|
||||
if (logic.initedVideoController)
|
||||
@@ -113,11 +121,15 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
right: 12,
|
||||
bottom: 6,
|
||||
child: GestureDetector(
|
||||
onTap: () => Get.to(() => VideoFullPage(playCtr: logic.playerController!, showMenu: false)),
|
||||
child: Image.asset("full_icon.png".videoPath, width: 26, height: 26),
|
||||
onTap: () => Get.to(() => VideoFullPage(
|
||||
playCtr: logic.playerController!, showMenu: false)),
|
||||
child: Image.asset("full_icon.png".videoPath,
|
||||
width: 26, height: 26),
|
||||
),
|
||||
),
|
||||
Obx(() => Offstage(offstage: !logic.isLoading.value, child: const LoadingCenterWidget())),
|
||||
Obx(() => Offstage(
|
||||
offstage: !logic.isLoading.value,
|
||||
child: const LoadingCenterWidget())),
|
||||
],
|
||||
],
|
||||
),
|
||||
@@ -139,10 +151,14 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
children: [
|
||||
const Text(
|
||||
'温馨提示',
|
||||
style: TextStyle(fontSize: 14, color: Colors.white, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
12.sizeBoxH,
|
||||
const Text('开通直播卡全站直播骚货免费观看', style: TextStyle(fontSize: 14, color: Colors.white)),
|
||||
const Text('开通直播卡全站直播骚货免费观看',
|
||||
style: TextStyle(fontSize: 14, color: Colors.white)),
|
||||
18.sizeBoxH,
|
||||
GestureDetector(
|
||||
onTap: logic.onChargeAction,
|
||||
@@ -155,8 +171,11 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
colors: [Color(0xffffe8be), Color(0xffe5b764)],
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
|
||||
child: const Text('立即开通直播卡', style: TextStyle(fontSize: 14, color: Color(0xFF7b0000))),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
|
||||
child: const Text('立即开通直播卡',
|
||||
style:
|
||||
TextStyle(fontSize: 14, color: Color(0xFF7b0000))),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -178,7 +197,8 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
Container(
|
||||
color: Colors.black.withValues(alpha: .7),
|
||||
alignment: Alignment.center,
|
||||
child: const Text('当前主播离线,请前往观看其她热门主播喔~', style: TextStyle(fontSize: 14, color: Colors.white)),
|
||||
child: const Text('当前主播离线,请前往观看其她热门主播喔~',
|
||||
style: TextStyle(fontSize: 14, color: Colors.white)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -204,7 +224,8 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
return const SliverToBoxAdapter(child: LoadingWidget());
|
||||
}
|
||||
if (logic.recommendList.isEmpty) {
|
||||
return const SliverToBoxAdapter(child: SizedBox(height: 300, child: CErrorWidget()));
|
||||
return const SliverToBoxAdapter(
|
||||
child: SizedBox(height: 300, child: CErrorWidget()));
|
||||
}
|
||||
return SliverPadding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
@@ -238,8 +259,10 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
onTap: () => Get.back(),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(left: 10, right: 2, top: 2, bottom: 2),
|
||||
decoration: const BoxDecoration(color: Colors.grey, shape: BoxShape.circle),
|
||||
child: Icon(Icons.arrow_back_ios, color: Colors.black.withValues(alpha: 0.8)),
|
||||
decoration:
|
||||
const BoxDecoration(color: Colors.grey, shape: BoxShape.circle),
|
||||
child: Icon(Icons.arrow_back_ios,
|
||||
color: Colors.black.withValues(alpha: 0.8)),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -260,7 +283,8 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
encrypt: false,
|
||||
),
|
||||
4.sizeBoxW,
|
||||
Text(logic.anchor?.name ?? '', style: const TextStyle(fontSize: 14, color: Colors.white)),
|
||||
Text(logic.anchor?.name ?? '',
|
||||
style: const TextStyle(fontSize: 14, color: Colors.white)),
|
||||
],
|
||||
),
|
||||
18.sizeBoxH,
|
||||
@@ -275,9 +299,12 @@ class _LiveDetailPageState extends State<LiveDetailPage> {
|
||||
onTap: () => logic.onShareAction(),
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset('live_share.png'.livePath, width: 24, color: Colors.white),
|
||||
Image.asset('live_share.png'.livePath,
|
||||
width: 24, color: Colors.white),
|
||||
2.sizeBoxW,
|
||||
const Text('分享', style: TextStyle(fontSize: 12, color: Color(0xff999999))),
|
||||
const Text('分享',
|
||||
style:
|
||||
TextStyle(fontSize: 12, color: Color(0xff999999))),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user