opt: live room

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-11 21:35:47 +08:00
parent 714f288170
commit 727ae8cd2b

View File

@@ -1,6 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'dart:math'; import 'dart:ui';
import 'package:PiliPlus/http/live.dart'; import 'package:PiliPlus/http/live.dart';
import 'package:PiliPlus/pages/live_room/widgets/chat.dart'; import 'package:PiliPlus/pages/live_room/widgets/chat.dart';
@@ -239,7 +239,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
) )
: Column( : Column(
children: [ children: [
_buildAppBar, Obx(() => _buildAppBar),
_buildBodyH, _buildBodyH,
], ],
), ),
@@ -420,13 +420,14 @@ class _LiveRoomPageState extends State<LiveRoomPage>
Widget get _buildBodyH { Widget get _buildBodyH {
double videoWidth = double videoWidth =
max(context.height / context.width * 1.04, 0.58) * context.width; clampDouble(context.height / context.width * 1.04, 0.58, 0.75) *
context.width;
return Expanded( return Expanded(
child: Row( child: Row(
children: [ children: [
Obx( Obx(
() => Container( () => Container(
color: Colors.black, color: isFullScreen ? Colors.black : null,
width: isFullScreen ? Get.size.width : videoWidth, width: isFullScreen ? Get.size.width : videoWidth,
height: isFullScreen ? Get.size.height : Get.size.width * 9 / 16, height: isFullScreen ? Get.size.height : Get.size.width * 9 / 16,
child: MediaQuery.removePadding( child: MediaQuery.removePadding(