自习室优化ok
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:agora_rtc_engine/agora_rtc_engine.dart';
|
||||
import 'package:app/config/config.dart';
|
||||
import 'package:app/global/config.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||
@@ -109,13 +109,13 @@ class _ContentViewState extends State<ContentView> {
|
||||
engine: _engine,
|
||||
),
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
top: 10,
|
||||
right: 10,
|
||||
child: Container(
|
||||
width: 150,
|
||||
width: 200,
|
||||
color: Colors.black,
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1 / 1.2,
|
||||
aspectRatio: 16 / 9,
|
||||
child: AgoraVideoView(
|
||||
controller: VideoViewController(
|
||||
rtcEngine: _engine!,
|
||||
@@ -128,21 +128,24 @@ class _ContentViewState extends State<ContentView> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: ListView.separated(
|
||||
itemBuilder: (_, index) {
|
||||
var item = otherStudents.elementAt(index);
|
||||
return SizedBox(
|
||||
height: 250,
|
||||
child: StudentItem(
|
||||
user: item,
|
||||
engine: _engine,
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, __) => SizedBox(height: 15),
|
||||
itemCount: otherStudents.length,
|
||||
Visibility(
|
||||
visible: otherStudents.isNotEmpty,
|
||||
child: SizedBox(
|
||||
width: 300,
|
||||
child: ListView.separated(
|
||||
itemBuilder: (_, index) {
|
||||
var item = otherStudents.elementAt(index);
|
||||
return SizedBox(
|
||||
height: 250,
|
||||
child: StudentItem(
|
||||
user: item,
|
||||
engine: _engine,
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, __) => SizedBox(height: 15),
|
||||
itemCount: otherStudents.length,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -26,9 +26,10 @@ class StudentItem extends StatefulWidget {
|
||||
|
||||
class _StudentItemState extends State<StudentItem> {
|
||||
///打开文件列表
|
||||
void _openFileList() {
|
||||
void _openFileList({required String name}) {
|
||||
showFileDialog(
|
||||
context,
|
||||
name: name,
|
||||
isUpload: false,
|
||||
files: widget.user.filesList,
|
||||
);
|
||||
@@ -160,7 +161,12 @@ class _StudentItemState extends State<StudentItem> {
|
||||
);
|
||||
},
|
||||
),
|
||||
_actionItem(icon: RemixIcons.file_list_3_fill, onTap: _openFileList),
|
||||
_actionItem(
|
||||
icon: RemixIcons.file_list_3_fill,
|
||||
onTap: (){
|
||||
_openFileList(name: widget.user.userName);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user