Browse Source

Merge branch 'new_dev' of https://github.com/deepcloud2048/deep_voice into new_dev

newdev_shunjiawei
lxm 1 year ago
parent
commit
8adf480e4f
  1. BIN
      assets/images/mine-background.png
  2. 103
      lib/modules/meeting/views/bottomSheet/navigation_bar_bottom_sheet.dart
  3. 267
      lib/modules/meeting/views/meeting_mine_view.dart
  4. 45
      lib/modules/meeting/views/meeting_view.dart
  5. 1
      pubspec.yaml

BIN
assets/images/mine-background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

103
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<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,
],
),
),
);
}
}

267
lib/modules/meeting/views/meeting_mine_view.dart

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class MeetingMineView extends StatefulWidget {
const MeetingMineView({super.key});
@ -10,6 +11,270 @@ class MeetingMineView extends StatefulWidget {
class _MeetingMineViewState extends State<MeetingMineView> {
@override
Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
backgroundColor: Colors.grey[100],
body: Container(
decoration: const BoxDecoration(
image: DecorationImage(
alignment: Alignment.topCenter,
image: AssetImage('assets/images/mine-background.png'),
fit: BoxFit.fitWidth,
),
),
child: SafeArea(
child: ListView(
padding: EdgeInsets.symmetric(horizontal: 12.w),
children: [
_head(),
_statistics(),
_box([
_item(
Icons.article_outlined,
'转写记录',
onTap: () {},
),
]),
_box([
_item(
Icons.settings_outlined,
'设置',
onTap: () {},
),
_item(
Icons.layers_outlined,
'模版社区',
onTap: () {},
),
_item(
Icons.sync_alt_outlined,
'集成',
onTap: () {},
),
]),
_box([
_item(
Icons.cloud_upload_outlined,
'DEAPSOUND PRIVATE CLOUD',
description: '开启',
onTap: () {},
),
]),
_box([
_item(
Icons.language_outlined,
'WEB',
description: 'web.deapsound.com',
onTap: () {},
),
_item(
Icons.settings_remote_outlined,
'我的DEAPSOUND设备',
onTap: () {},
),
]),
_box([
_item(
Icons.help_outline_rounded,
'帮助与反馈',
onTap: () {},
),
_item(
Icons.info_outline_rounded,
'关于DEAPSOUND',
description: 'v1.0.0',
onTap: () {},
),
]),
],
),
),
),
);
}
Widget _head() {
return Padding(
padding: EdgeInsets.symmetric(vertical: 20.w),
child: GestureDetector(
onTap: () {},
child: Row(
children: [
Container(
width: 50.w,
height: 50.w,
margin: EdgeInsets.only(right: 10.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50.w),
image: const DecorationImage(
image: NetworkImage(
'https://pic8.iqiyipic.com/image/20250403/ed/a7/a_100013977_m_601_m75_318_424.avif'),
fit: BoxFit.cover,
),
),
),
Expanded(
child: Text(
'tianming liu',
style: TextStyle(
color: Colors.black87,
fontSize: 20.sp,
fontWeight: FontWeight.bold,
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 16.w,
color: Colors.grey[700],
),
],
),
),
);
}
Widget _statistics() {
return Container(
padding: EdgeInsets.all(8.w),
margin: EdgeInsets.only(bottom: 15.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16.w),
),
child: Column(
children: [
Row(
children: [
_statisticsItem('2', '天', Colors.lime),
_statisticsItem('4', '文件', Colors.lightGreen),
_statisticsItem('1.5', '小时', Colors.blueGrey),
],
),
Container(
height: 80.w,
padding: EdgeInsets.symmetric(horizontal: 2.w),
margin: EdgeInsets.only(top: 8.w, bottom: 2.w),
child: GridView.builder(
scrollDirection: Axis.horizontal,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 7,
mainAxisSpacing: 2.w,
crossAxisSpacing: 2.w,
),
itemCount: 364,
itemBuilder: (BuildContext context, int index) {
return Container(
decoration: BoxDecoration(
color: Colors.grey[200],
borderRadius: BorderRadius.circular(2.w),
),
);
},
),
),
],
),
);
}
Widget _statisticsItem(String amount, String unit, Color color) {
return Expanded(
child: Container(
height: 30.w,
margin: EdgeInsets.symmetric(horizontal: 2.w),
alignment: Alignment.center,
decoration: BoxDecoration(
color: color.withOpacity(0.2),
borderRadius: BorderRadius.circular(8.w),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
amount,
style: TextStyle(
height: 0.1,
color: Colors.black87,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
),
2.horizontalSpace,
Text(
unit,
style: TextStyle(
height: 0.1,
color: Colors.grey,
fontSize: 10.sp,
),
),
],
),
),
);
}
Widget _box(List<Widget> children) {
return Container(
padding: EdgeInsets.symmetric(vertical: 5.w),
margin: EdgeInsets.only(bottom: 15.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16.w),
),
child: Column(
children: children,
),
);
}
Widget _item(
IconData icon,
String title, {
String? description,
Function()? onTap,
}) {
return GestureDetector(
onTap: onTap,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 12.w),
child: Row(
children: [
Icon(
icon,
size: 24.w,
color: Colors.grey,
),
8.horizontalSpace,
Expanded(
child: Text(
title,
style: TextStyle(
color: Colors.black87,
fontSize: 16.sp,
),
),
),
if (description != null)
Padding(
padding: EdgeInsets.only(right: 5.w),
child: Text(
description,
style: TextStyle(
color: Colors.grey,
fontSize: 16.sp,
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 16.w,
color: Colors.grey,
),
],
),
),
);
}
}

45
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<MeetingController> {
const MeetingView({super.key});
@ -37,7 +40,6 @@ class MeetingView extends GetView<MeetingController> {
),
BottomNavigationBarItem(
icon: SizedBox(),
activeIcon: SizedBox(),
label: '',
),
BottomNavigationBarItem(
@ -53,7 +55,7 @@ class MeetingView extends GetView<MeetingController> {
unselectedFontSize: 10.sp,
selectedFontSize: 10.sp,
onTap: (int index) {
if (index == controller.pageIndex.value) return;
if (index == 1 || index == controller.pageIndex.value) return;
if (index == 0) {
controller.pageIndex.value = 0;
controller.pageController.jumpToPage(0);
@ -66,25 +68,36 @@ class MeetingView extends GetView<MeetingController> {
),
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,
),
),
),
),

1
pubspec.yaml

@ -135,6 +135,7 @@ flutter:
- assets/images/explore.png
- assets/images/explore1.png
- assets/images/explore2.jpg
- assets/images/mine-background.png
- assets/lottie/
- assets/js/
- .env

Loading…
Cancel
Save