diff --git a/lib/modules/common/webview_page.dart b/lib/modules/common/webview_page.dart index b80bf348b..7056077f2 100644 --- a/lib/modules/common/webview_page.dart +++ b/lib/modules/common/webview_page.dart @@ -20,8 +20,9 @@ class WebViewPage extends StatelessWidget { return Scaffold( backgroundColor: isDarkMode ? Colors.black : Colors.grey[50], appBar: AppBar( - centerTitle: true, - title: Text(title), + backgroundColor: isDarkMode ? Colors.black : Colors.white, + surfaceTintColor: Colors.transparent, + elevation: 0.5, leading: IconButton( icon: Icon( Icons.arrow_back_ios, @@ -30,9 +31,15 @@ class WebViewPage extends StatelessWidget { ), onPressed: () => Get.back(), ), - backgroundColor: isDarkMode ? Colors.black : Colors.white, - foregroundColor: isDarkMode ? Colors.white : Colors.black, - elevation: 0, + title: Text( + title, + style: TextStyle( + fontSize: 17.sp, + fontWeight: FontWeight.w600, + color: isDarkMode ? Colors.white : Colors.black, + ), + ), + centerTitle: true, ), body: WebViewWidget( controller: controller, diff --git a/lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart new file mode 100644 index 000000000..e77769091 --- /dev/null +++ b/lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart @@ -0,0 +1,169 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../common/webview_page.dart'; + +class MemberBottomSheet extends StatelessWidget { + const MemberBottomSheet({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric(horizontal: 12.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.vertical( + top: Radius.circular(12.r), + ), + image: const DecorationImage( + alignment: Alignment.topCenter, + image: AssetImage('assets/images/mine-background.png'), + fit: BoxFit.fitWidth, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Container( + margin: EdgeInsets.only(top: 12.w), + alignment: Alignment.centerRight, + child: GestureDetector( + onTap: () => Get.back(), + child: Container( + width: 26.w, + height: 26.w, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(26.r), + ), + child: Icon( + Icons.close, + size: 18.w, + color: Colors.grey[400], + ), + ), + ), + ), + Text( + '解锁 Starter 会员', + style: TextStyle( + color: Colors.black87, + fontSize: 18.sp, + fontWeight: FontWeight.bold, + ), + ), + Padding( + padding: EdgeInsets.only(top: 5.w, bottom: 20.w), + child: Text( + '绑定 VOITRANS 设备可激活 Starter 会员权益,解锁:', + style: TextStyle( + color: Colors.grey, + fontSize: 14.sp, + ), + ), + ), + _item(Icons.access_time, Colors.red, '每月300分钟转写时长'), + _item(Icons.description, Colors.purpleAccent, '为行业细分场景设计的专业总结模版'), + _item(Icons.auto_awesome, Colors.purpleAccent, 'Autopilot 模版自动总结'), + _item(Icons.people, Colors.red, '区分不同说话人'), + _item(Icons.cloud_upload, Colors.red, '从APP、WEB导入音频进行转写和总结'), + Padding( + padding: EdgeInsets.symmetric(vertical: 20.w), + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Get.to( + () => const WebViewPage( + url: 'https://web.voitrans.net', + title: 'Voitrans', + ), + ); + }, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.r), + border: Border.all( + color: Colors.grey[400]!, + ), + ), + child: Text( + '发现更多', + style: TextStyle( + fontSize: 16.sp, + color: Colors.black, + ), + ), + ), + ), + ), + 10.horizontalSpace, + Expanded( + child: GestureDetector( + onTap: () {}, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + '立即绑定', + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + ), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ); + } + + Widget _item(IconData icon, Color color, String title) { + return Padding( + padding: EdgeInsets.symmetric(vertical: 10.w), + child: Row( + children: [ + Container( + width: 50.w, + height: 50.w, + margin: EdgeInsets.only(right: 10.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16.r), + border: Border.all( + color: Colors.red.withOpacity(0.1), + width: 2.w, + ), + ), + child: Icon( + icon, + size: 24.w, + color: color, + ), + ), + Expanded( + child: Text( + title, + style: TextStyle( + color: Colors.black87, + fontSize: 14.sp, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/modules/meeting/views/meeting_mine_view.dart b/lib/modules/meeting/views/meeting_mine_view.dart index b3609f031..8c58f90aa 100644 --- a/lib/modules/meeting/views/meeting_mine_view.dart +++ b/lib/modules/meeting/views/meeting_mine_view.dart @@ -7,8 +7,10 @@ import '../../profile/views/unified_avatar.dart'; import '../controllers/meeting_controller.dart'; import '../controllers/meeting_mine_controller.dart'; import '../utils/meeting_ui_utils.dart'; +import 'bottomSheet/member_bottom_sheet.dart'; import 'bottomSheet/statistics_bottom_sheet.dart'; import 'mine/meeting_cloud_view.dart'; +import 'mine/meeting_member_view.dart'; import 'mine/meeting_transcription_view.dart'; class MeetingMineView extends StatefulWidget { @@ -96,7 +98,9 @@ class _MeetingMineViewState extends State _item( Icons.settings_remote_outlined, '我的VOITRANS设备', - onTap: () {}, + onTap: () { + Get.toNamed(Routes.devices); + }, ), ]), _box([ @@ -290,93 +294,113 @@ class _MeetingMineViewState extends State ), child: Column( children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Voitrans AI会员', - style: TextStyle( - color: MeetingUIUtils.getTextColor(isDarkMode), - fontSize: 16.sp, + GestureDetector( + onTap: () { + Get.to(() => const MeetingMemberView()); + }, + behavior: HitTestBehavior.translucent, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Voitrans AI会员', + style: TextStyle( + color: MeetingUIUtils.getTextColor(isDarkMode), + fontSize: 16.sp, + ), ), - ), - Icon( - Icons.arrow_forward_ios, - size: 16.w, - color: Colors.grey, - ), - ], + Icon( + Icons.arrow_forward_ios, + size: 16.w, + color: Colors.grey, + ), + ], + ), ), ), - Container( - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 15.w), - decoration: BoxDecoration( - color: Colors.black87, - borderRadius: BorderRadius.circular(16.w), - ), - child: Column( - children: [ - Row( - children: [ - Icon( - Icons.auto_awesome, - color: Colors.amberAccent, - size: 25.sp, - ), - 5.horizontalSpace, - Text( - '解锁 Starter 会员', - style: TextStyle( - color: Colors.white, - fontSize: 18.sp, - fontWeight: FontWeight.bold, - ), - ), - ], + GestureDetector( + onTap: () { + Get.bottomSheet( + const MemberBottomSheet(), + isScrollControlled: true, + backgroundColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(12.r), + ), ), - Padding( - padding: EdgeInsets.only(top: 15.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + ); + }, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 15.w), + decoration: BoxDecoration( + color: Colors.black87, + borderRadius: BorderRadius.circular(16.w), + ), + child: Column( + children: [ + Row( children: [ + Icon( + Icons.auto_awesome, + color: Colors.amberAccent, + size: 25.sp, + ), + 5.horizontalSpace, Text( - '绑定 Voitrans 设备可激活 Starter 会员', + '解锁 Starter 会员', style: TextStyle( color: Colors.white, - fontSize: 12.sp, + fontSize: 18.sp, + fontWeight: FontWeight.bold, ), ), - GestureDetector( - onTap: () {}, - child: Container( - padding: EdgeInsets.symmetric( - horizontal: 10.w, - vertical: 6.w, + ], + ), + Padding( + padding: EdgeInsets.only(top: 15.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '绑定 Voitrans 设备可激活 Starter 会员', + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50.w), - gradient: const LinearGradient( - colors: [Colors.blue, Colors.pink], - begin: Alignment.centerLeft, - end: Alignment.centerRight, + ), + GestureDetector( + onTap: () {}, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 10.w, + vertical: 6.w, ), - ), - child: Text( - '立即解锁', - style: TextStyle( - color: Colors.white, - fontSize: 14.sp, - fontWeight: FontWeight.bold, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50.w), + gradient: const LinearGradient( + colors: [Colors.blue, Colors.pink], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + child: Text( + '立即解锁', + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.bold, + ), ), ), ), - ), - ], + ], + ), ), - ), - ], + ], + ), ), ), ], diff --git a/lib/modules/meeting/views/mine/meeting_member_view.dart b/lib/modules/meeting/views/mine/meeting_member_view.dart new file mode 100644 index 000000000..44e4328f3 --- /dev/null +++ b/lib/modules/meeting/views/mine/meeting_member_view.dart @@ -0,0 +1,10 @@ +import 'package:flutter/material.dart'; + +class MeetingMemberView extends StatelessWidget { + const MeetingMemberView({super.key}); + + @override + Widget build(BuildContext context) { + return const Placeholder(); + } +}