106 lines
3.0 KiB
Dart
106 lines
3.0 KiB
Dart
import 'package:app/widgets/room/file_drawer.dart';
|
|
import 'package:app/widgets/room/video_surface.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:remixicon/remixicon.dart';
|
|
|
|
class StudentItem extends StatefulWidget {
|
|
const StudentItem({super.key});
|
|
|
|
@override
|
|
State<StudentItem> createState() => _StudentItemState();
|
|
}
|
|
|
|
class _StudentItemState extends State<StudentItem> {
|
|
///打开文件列表
|
|
void _openFileList(){
|
|
showFileDialog(context,isUpload: false);
|
|
}
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ClipRRect(
|
|
borderRadius: BorderRadius.circular(10),
|
|
child: Container(
|
|
color: Color(0xFF404649),
|
|
child: Column(
|
|
children: [
|
|
Expanded(
|
|
child: SizedBox(
|
|
width: double.infinity,
|
|
child: Stack(
|
|
children: [
|
|
VideoSurface(
|
|
),
|
|
Positioned(
|
|
bottom: 0,
|
|
left: 0,
|
|
right: 0,
|
|
child: Container(
|
|
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 8),
|
|
decoration: BoxDecoration(
|
|
gradient: LinearGradient(
|
|
colors: [Color(0x0b050505), Color(0x54050505)],
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
),
|
|
),
|
|
child: Text(
|
|
"李明辉",
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 14,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
ColoredBox(
|
|
color: Color(0xFF232426),
|
|
child: Row(
|
|
children: [
|
|
_actionItem(icon: RemixIcons.video_on_fill, isActive: false),
|
|
_actionItem(
|
|
icon: RemixIcons.mic_off_fill,
|
|
),
|
|
_actionItem(
|
|
icon: RemixIcons.volume_mute_fill,
|
|
),
|
|
_actionItem(
|
|
icon: RemixIcons.file_list_3_fill,
|
|
onTap: _openFileList
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
///
|
|
Widget _actionItem({
|
|
required IconData icon,
|
|
bool isActive = true,
|
|
void Function()? onTap,
|
|
}) {
|
|
Color offColor = Color(0xFFE75B61);
|
|
return Expanded(
|
|
child: Container(
|
|
height: 50,
|
|
color: isActive ? null : offColor.withValues(alpha: 0.3),
|
|
child: IconButton(
|
|
onPressed: onTap,
|
|
icon: Icon(
|
|
icon,
|
|
color: isActive ? Colors.white : offColor,
|
|
size: 20,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|