5 changed files with 399 additions and 17 deletions
|
After Width: | Height: | Size: 155 KiB |
@ -0,0 +1,103 @@ |
|||||
|
import 'package:flutter/material.dart'; |
||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
|
import 'package:get/get_navigation/src/extension_navigation.dart'; |
||||
|
import 'package:get/state_manager.dart'; |
||||
|
|
||||
|
import '../../controllers/meeting_home_controller.dart'; |
||||
|
|
||||
|
class NavigationBarBottomSheet extends GetView<MeetingHomeController> { |
||||
|
const NavigationBarBottomSheet({super.key}); |
||||
|
|
||||
|
@override |
||||
|
Widget build(BuildContext context) { |
||||
|
return SafeArea( |
||||
|
child: Column( |
||||
|
mainAxisSize: MainAxisSize.min, |
||||
|
children: [ |
||||
|
_buildItem( |
||||
|
'开始录音', |
||||
|
Icons.mic_rounded, |
||||
|
Colors.red, |
||||
|
), |
||||
|
SizedBox(height: 15.w), |
||||
|
_buildItem( |
||||
|
'导入音频', |
||||
|
Icons.file_upload_outlined, |
||||
|
Colors.deepPurple, |
||||
|
onTap: () { |
||||
|
Get.back(); |
||||
|
controller.addAudio(); |
||||
|
}, |
||||
|
), |
||||
|
SizedBox(height: 24.w), |
||||
|
GestureDetector( |
||||
|
onTap: () => Get.back(), |
||||
|
child: Container( |
||||
|
width: 45.w, |
||||
|
height: 45.w, |
||||
|
decoration: BoxDecoration( |
||||
|
color: Colors.black.withOpacity(0.8), |
||||
|
borderRadius: BorderRadius.circular(50.w), |
||||
|
), |
||||
|
child: const Icon(Icons.close, color: Colors.white), |
||||
|
), |
||||
|
), |
||||
|
SizedBox(height: 24.w), |
||||
|
], |
||||
|
), |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
Widget _buildItem( |
||||
|
String title, |
||||
|
IconData icon, |
||||
|
Color color, { |
||||
|
Function()? onTap, |
||||
|
}) { |
||||
|
return GestureDetector( |
||||
|
onTap: onTap, |
||||
|
child: Container( |
||||
|
width: 220.w, |
||||
|
height: 60.w, |
||||
|
padding: EdgeInsets.all(5.w), |
||||
|
decoration: BoxDecoration( |
||||
|
color: Colors.white.withOpacity(onTap != null ? 1 : 0.5), |
||||
|
borderRadius: BorderRadius.circular(60.w), |
||||
|
), |
||||
|
child: Row( |
||||
|
children: [ |
||||
|
Container( |
||||
|
width: 46.w, |
||||
|
height: 46.w, |
||||
|
margin: EdgeInsets.only(right: 5.w), |
||||
|
decoration: BoxDecoration( |
||||
|
color: color.withOpacity(onTap != null ? 0.3 : 0.2), |
||||
|
borderRadius: BorderRadius.circular(60.w), |
||||
|
), |
||||
|
child: Icon( |
||||
|
icon, |
||||
|
color: color.withOpacity(onTap != null ? 1 : 0.5), |
||||
|
), |
||||
|
), |
||||
|
Expanded( |
||||
|
child: Text( |
||||
|
title, |
||||
|
style: TextStyle( |
||||
|
fontSize: 15.sp, |
||||
|
color: Colors.black87.withOpacity(onTap != null ? 1 : 0.5), |
||||
|
fontWeight: FontWeight.bold, |
||||
|
), |
||||
|
), |
||||
|
), |
||||
|
Icon( |
||||
|
Icons.arrow_forward_ios, |
||||
|
size: 16.w, |
||||
|
color: Colors.grey.withOpacity(onTap != null ? 1 : 0.5), |
||||
|
), |
||||
|
5.horizontalSpace, |
||||
|
], |
||||
|
), |
||||
|
), |
||||
|
); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue