|
|
|
@ -90,86 +90,36 @@ class MeetingRecordView extends GetView<MeetingRecordController> { |
|
|
|
|
|
|
|
// 构建主体内容 |
|
|
|
Widget _buildBody(bool isDarkMode) { |
|
|
|
return Padding( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.w), |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
return Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
10.verticalSpace, |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w), |
|
|
|
child: Text( |
|
|
|
controller.title, |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.white : Colors.black87, |
|
|
|
fontSize: 17.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.w), |
|
|
|
child: Text( |
|
|
|
DateUtil.formatDateMs( |
|
|
|
controller.creationTime, |
|
|
|
format: DateFormats.y_mo_d_h_m, |
|
|
|
), |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.grey[400] : Colors.grey[500], |
|
|
|
fontSize: 14.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
_audioWave(isDarkMode), |
|
|
|
_recordContent(isDarkMode), |
|
|
|
_bottomButton(isDarkMode), |
|
|
|
], |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
// 音波 |
|
|
|
Widget _audioWave(bool isDarkMode) { |
|
|
|
return Container( |
|
|
|
width: double.infinity, |
|
|
|
height: 70.w, |
|
|
|
margin: EdgeInsets.symmetric(vertical: 5.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode ? Colors.white.withOpacity(0.05) : Colors.white, |
|
|
|
borderRadius: BorderRadius.circular(12.w), |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
color: isDarkMode |
|
|
|
? Colors.black.withOpacity(0.2) |
|
|
|
: Colors.black.withOpacity(0.05), |
|
|
|
blurRadius: 10, |
|
|
|
offset: const Offset(0, 2), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
Expanded( |
|
|
|
child: Lottie.asset( |
|
|
|
'assets/lottie/audio_wave.json', |
|
|
|
controller: controller.lottieController, |
|
|
|
fit: BoxFit.fill, |
|
|
|
onLoaded: (composition) { |
|
|
|
controller.lottieController.duration = composition.duration; |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
child: Lottie.asset( |
|
|
|
'assets/lottie/audio_wave.json', |
|
|
|
controller: controller.lottieController, |
|
|
|
fit: BoxFit.fill, |
|
|
|
), |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 5.w), |
|
|
|
child: Text( |
|
|
|
DateUtil.formatDateMs( |
|
|
|
controller.creationTime, |
|
|
|
format: DateFormats.y_mo_d_h_m, |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
child: Lottie.asset( |
|
|
|
'assets/lottie/audio_wave.json', |
|
|
|
controller: controller.lottieController, |
|
|
|
fit: BoxFit.fill, |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.grey[400] : Colors.grey[500], |
|
|
|
fontSize: 14.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
_recordContent(isDarkMode), |
|
|
|
_bottomButton(isDarkMode), |
|
|
|
], |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
@ -179,7 +129,7 @@ class MeetingRecordView extends GetView<MeetingRecordController> { |
|
|
|
child: Container( |
|
|
|
width: double.infinity, |
|
|
|
padding: EdgeInsets.all(10.w), |
|
|
|
margin: EdgeInsets.symmetric(vertical: 5.w), |
|
|
|
margin: EdgeInsets.symmetric(horizontal: 12.w, vertical: 5.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode ? Colors.white.withOpacity(0.05) : Colors.white, |
|
|
|
borderRadius: BorderRadius.circular(12.w), |
|
|
|
@ -210,51 +160,121 @@ class MeetingRecordView extends GetView<MeetingRecordController> { |
|
|
|
|
|
|
|
// 底部按钮 |
|
|
|
Widget _bottomButton(bool isDarkMode) { |
|
|
|
return Padding( |
|
|
|
padding: EdgeInsets.only(top: 40.w, bottom: 30.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
GestureDetector( |
|
|
|
onTap: controller.recorderHandle, |
|
|
|
child: Container( |
|
|
|
width: 130.w, |
|
|
|
height: 60.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(60.w), |
|
|
|
border: Border.all( |
|
|
|
color: isDarkMode ? AppColors.primary : Colors.blue, |
|
|
|
width: 2.w, |
|
|
|
return Container( |
|
|
|
margin: EdgeInsets.only(top: 10.h), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode ? AppColors.cardBackground : Colors.white, |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
color: Colors.black.withOpacity(0.05), |
|
|
|
blurRadius: 3, |
|
|
|
offset: const Offset(0, -1), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
child: SafeArea( |
|
|
|
child: SizedBox( |
|
|
|
height: 80.h, |
|
|
|
child: Padding( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
// 语音录制按钮 |
|
|
|
Container( |
|
|
|
width: 60.r, |
|
|
|
height: 60.r, |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode |
|
|
|
? Colors.white.withOpacity(0.1) |
|
|
|
: Colors.white, |
|
|
|
shape: BoxShape.circle, |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
color: Colors.black.withOpacity(0.1), |
|
|
|
blurRadius: 8, |
|
|
|
spreadRadius: 1, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Obx( |
|
|
|
() => IconButton( |
|
|
|
icon: Icon( |
|
|
|
controller.isRecording.value |
|
|
|
? Icons.mic |
|
|
|
: Icons.mic_none, |
|
|
|
), |
|
|
|
color: controller.isRecording.value |
|
|
|
? AppColors.primary |
|
|
|
: Colors.grey.shade400, |
|
|
|
iconSize: 28.r, |
|
|
|
padding: EdgeInsets.zero, |
|
|
|
onPressed: controller.recorderHandle, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
child: Obx( |
|
|
|
() => Icon( |
|
|
|
controller.isRecording.value ? Icons.pause : Icons.play_arrow, |
|
|
|
color: isDarkMode ? AppColors.primary : Colors.blue, |
|
|
|
size: 40.w, |
|
|
|
10.horizontalSpace, |
|
|
|
Expanded( |
|
|
|
child: Lottie.asset( |
|
|
|
'assets/lottie/audio_wave.json', |
|
|
|
controller: controller.lottieController, |
|
|
|
fit: BoxFit.fill, |
|
|
|
onLoaded: (composition) { |
|
|
|
controller.lottieController.duration = |
|
|
|
composition.duration; |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
_showAlertDialog(isDarkMode); |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
width: 130.w, |
|
|
|
height: 60.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode ? AppColors.primary : Colors.blue, |
|
|
|
borderRadius: BorderRadius.circular(60.w), |
|
|
|
), |
|
|
|
child: Icon( |
|
|
|
Icons.fiber_manual_record_outlined, |
|
|
|
color: Colors.white, |
|
|
|
size: 40.w, |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
child: Lottie.asset( |
|
|
|
'assets/lottie/audio_wave.json', |
|
|
|
controller: controller.lottieController, |
|
|
|
fit: BoxFit.fill, |
|
|
|
onLoaded: (composition) { |
|
|
|
controller.lottieController.duration = |
|
|
|
composition.duration; |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
10.horizontalSpace, |
|
|
|
// 关闭按钮 |
|
|
|
Container( |
|
|
|
width: 60.r, |
|
|
|
height: 60.r, |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: isDarkMode |
|
|
|
? Colors.white.withOpacity(0.1) |
|
|
|
: Colors.white, |
|
|
|
shape: BoxShape.circle, |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
color: Colors.black.withOpacity(0.1), |
|
|
|
blurRadius: 8, |
|
|
|
spreadRadius: 1, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: IconButton( |
|
|
|
icon: Icon( |
|
|
|
Icons.close, |
|
|
|
color: isDarkMode ? Colors.white : Colors.grey.shade600, |
|
|
|
size: 28.r, |
|
|
|
), |
|
|
|
padding: EdgeInsets.zero, |
|
|
|
onPressed: () { |
|
|
|
_showAlertDialog(isDarkMode); |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
|