mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: live room
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -333,9 +333,12 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
onPointerDown: (_) {
|
onPointerDown: (_) {
|
||||||
_node.unfocus();
|
_node.unfocus();
|
||||||
},
|
},
|
||||||
child: LiveRoomChat(
|
child: Padding(
|
||||||
roomId: _roomId,
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
liveRoomController: _liveRoomController,
|
child: LiveRoomChat(
|
||||||
|
roomId: _roomId,
|
||||||
|
liveRoomController: _liveRoomController,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class _LiveRoomChatState extends State<LiveRoomChat> {
|
|||||||
children: [
|
children: [
|
||||||
Obx(
|
Obx(
|
||||||
() => ListView.separated(
|
() => ListView.separated(
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
controller: widget.liveRoomController.scrollController,
|
controller: widget.liveRoomController.scrollController,
|
||||||
separatorBuilder: (_, index) => const SizedBox(height: 6),
|
separatorBuilder: (_, index) => const SizedBox(height: 6),
|
||||||
itemCount: widget.liveRoomController.messages.length,
|
itemCount: widget.liveRoomController.messages.length,
|
||||||
@@ -82,9 +83,12 @@ class _LiveRoomChatState extends State<LiveRoomChat> {
|
|||||||
() => widget.liveRoomController.disableAutoScroll.value
|
() => widget.liveRoomController.disableAutoScroll.value
|
||||||
? Positioned(
|
? Positioned(
|
||||||
right: 12,
|
right: 12,
|
||||||
bottom: 12,
|
bottom: 0,
|
||||||
child: ElevatedButton.icon(
|
child: ElevatedButton.icon(
|
||||||
icon: const Icon(Icons.arrow_downward_rounded),
|
icon: const Icon(
|
||||||
|
Icons.arrow_downward_rounded,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
label: const Text('回到底部'),
|
label: const Text('回到底部'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.liveRoomController.disableAutoScroll.value = false;
|
widget.liveRoomController.disableAutoScroll.value = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user