1
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:app/global/theme/base/app_theme_ext.dart';
|
||||
import 'package:app/pages/student/home/viewmodel/s_home_vm.dart';
|
||||
import 'package:app/widgets/version/version_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'widgets/tip_card.dart';
|
||||
@@ -13,7 +12,6 @@ class SHomePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
showUpdateDialog(context);
|
||||
return ChangeNotifierProvider(
|
||||
create: (_) => SHomeVm(),
|
||||
child: _HomeView(),
|
||||
|
||||
@@ -54,15 +54,18 @@ class TeacherVideo extends StatelessWidget {
|
||||
Positioned(
|
||||
top: 30,
|
||||
left: 10,
|
||||
child: Container(
|
||||
width: 200,
|
||||
color: Colors.black,
|
||||
child: AspectRatio(
|
||||
aspectRatio: 16 / 9,
|
||||
child: AgoraVideoView(
|
||||
controller: VideoViewController(
|
||||
rtcEngine: vm.engine!,
|
||||
canvas: const VideoCanvas(uid: 0),
|
||||
child: Visibility(
|
||||
visible: !vm.cameraClose,
|
||||
child: Container(
|
||||
width: 200,
|
||||
color: Colors.black,
|
||||
child: AspectRatio(
|
||||
aspectRatio: 16 / 9,
|
||||
child: AgoraVideoView(
|
||||
controller: VideoViewController(
|
||||
rtcEngine: vm.engine!,
|
||||
canvas: const VideoCanvas(uid: 0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -103,6 +103,7 @@ class StuRoomVM extends ChangeNotifier {
|
||||
//启动连接
|
||||
await _ws.connect();
|
||||
//
|
||||
_sub?.cancel();
|
||||
_sub = _ws.stream.listen((msg) {
|
||||
//自习室人员变化,同时也设置房间是否开了
|
||||
if (msg.event == RoomEvent.changeUser) {
|
||||
|
||||
Reference in New Issue
Block a user