93 lines
2.0 KiB
Dart
93 lines
2.0 KiB
Dart
import 'package:app/widgets/room/file_drawer.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:remixicon/remixicon.dart';
|
|
|
|
|
|
class BottomBar extends StatefulWidget {
|
|
const BottomBar({super.key});
|
|
|
|
@override
|
|
State<BottomBar> createState() => _BottomBarState();
|
|
}
|
|
|
|
class _BottomBarState extends State<BottomBar> {
|
|
///显示文件
|
|
void _handShowFile() {
|
|
showFileDialog(context);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
color: Color(0xff232426),
|
|
),
|
|
height: 70,
|
|
child: Row(
|
|
children: [
|
|
BarItem(
|
|
title: "摄像头",
|
|
icon: RemixIcons.video_on_fill,
|
|
),
|
|
BarItem(
|
|
title: "麦克风",
|
|
icon: RemixIcons.mic_off_fill,
|
|
),
|
|
BarItem(
|
|
title: "已静音",
|
|
icon: RemixIcons.volume_mute_fill,
|
|
isOff: true,
|
|
),
|
|
BarItem(
|
|
title: "举手",
|
|
icon: RemixIcons.hand,
|
|
),
|
|
BarItem(
|
|
title: "拍照",
|
|
icon: RemixIcons.upload_2_fill,
|
|
onTap: _handShowFile,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class BarItem extends StatelessWidget {
|
|
final String title;
|
|
final IconData icon;
|
|
final bool isOff;
|
|
final void Function()? onTap;
|
|
|
|
const BarItem({
|
|
super.key,
|
|
required this.title,
|
|
required this.icon,
|
|
this.isOff = false,
|
|
this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Expanded(
|
|
child: InkWell(
|
|
onTap: onTap,
|
|
child: Container(
|
|
color: isOff ? Colors.red : null,
|
|
child: Column(
|
|
spacing: 3,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Icon(icon, color: Colors.white),
|
|
Text(
|
|
title,
|
|
style: TextStyle(color: Colors.white70, fontSize: 12),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|