diff --git a/lib/modules/meeting/views/bottomSheet/navigation_bar_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/navigation_bar_bottom_sheet.dart new file mode 100644 index 000000000..980ef0807 --- /dev/null +++ b/lib/modules/meeting/views/bottomSheet/navigation_bar_bottom_sheet.dart @@ -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 { + 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, + ], + ), + ), + ); + } +} diff --git a/lib/modules/meeting/views/meeting_view.dart b/lib/modules/meeting/views/meeting_view.dart index c080614b2..da8417a9b 100644 --- a/lib/modules/meeting/views/meeting_view.dart +++ b/lib/modules/meeting/views/meeting_view.dart @@ -1,9 +1,12 @@ +import 'dart:ui'; + import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import '../controllers/meeting_controller.dart'; import 'bottomSheet/filtrate_drawer.dart'; +import 'bottomSheet/navigation_bar_bottom_sheet.dart'; class MeetingView extends GetView { const MeetingView({super.key}); @@ -66,25 +69,36 @@ class MeetingView extends GetView { ), Positioned( top: -18.w, - child: Container( - width: 60.w, - height: 60.w, - padding: EdgeInsets.all(5.w), - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(60.w), - ), + child: GestureDetector( + onTap: () { + Get.bottomSheet( + BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), + child: const NavigationBarBottomSheet(), + ), + isScrollControlled: true, + ); + }, child: Container( + width: 60.w, + height: 60.w, + padding: EdgeInsets.all(5.w), alignment: Alignment.center, decoration: BoxDecoration( - color: Colors.red, + color: Colors.white, borderRadius: BorderRadius.circular(60.w), ), - child: Icon( - Icons.add, - color: Colors.white, - size: 30.w, + child: Container( + alignment: Alignment.center, + decoration: BoxDecoration( + color: Colors.red, + borderRadius: BorderRadius.circular(60.w), + ), + child: Icon( + Icons.add, + color: Colors.white, + size: 30.w, + ), ), ), ),