|
|
@ -161,21 +161,63 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
|
|
|
|
|
// 构建主体内容 |
|
|
// 构建主体内容 |
|
|
Widget _buildBody(BuildContext context, bool isDarkMode) { |
|
|
Widget _buildBody(BuildContext context, bool isDarkMode) { |
|
|
|
|
|
double initialPosition = 0; |
|
|
return Column( |
|
|
return Column( |
|
|
children: [ |
|
|
children: [ |
|
|
_soundWave(isDarkMode), |
|
|
GestureDetector( |
|
|
Container( |
|
|
behavior: HitTestBehavior.translucent, |
|
|
padding: EdgeInsets.symmetric(horizontal: 8.w), |
|
|
onVerticalDragStart: (DragStartDetails dragStartDetails) { |
|
|
margin: EdgeInsets.symmetric(vertical: 10.w), |
|
|
initialPosition = dragStartDetails.localPosition.dy; |
|
|
child: Obx( |
|
|
}, |
|
|
() => Row( |
|
|
onVerticalDragUpdate: (DragUpdateDetails dragUpdateDetails) { |
|
|
children: [ |
|
|
controller.dragOffset.value += dragUpdateDetails.delta.dy; |
|
|
_iconItem(Icons.summarize, '概述', 0), |
|
|
}, |
|
|
_iconItem(Icons.message, '转写', 1), |
|
|
onVerticalDragEnd: (DragEndDetails dragEndDetails) { |
|
|
_iconItem(Icons.article, '总结', 2), |
|
|
double offset = initialPosition - dragEndDetails.localPosition.dy; |
|
|
_iconItem(Icons.lan, '思维导图', 3), |
|
|
if (offset > 0) { |
|
|
], |
|
|
if (controller.isTop.value) { |
|
|
), |
|
|
controller.dragOffset.value = 0; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (offset > 60) { |
|
|
|
|
|
controller.dragOffset.value = 0; |
|
|
|
|
|
controller.isTop.value = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
controller.dragOffset.value = 210.w; |
|
|
|
|
|
controller.isTop.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if (!controller.isTop.value) { |
|
|
|
|
|
controller.dragOffset.value = 210.w; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (offset < -60) { |
|
|
|
|
|
controller.dragOffset.value = 210.w; |
|
|
|
|
|
controller.isTop.value = false; |
|
|
|
|
|
} else { |
|
|
|
|
|
controller.dragOffset.value = 0; |
|
|
|
|
|
controller.isTop.value = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
_soundWave(isDarkMode), |
|
|
|
|
|
Container( |
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 8.w), |
|
|
|
|
|
margin: EdgeInsets.symmetric(vertical: 10.w), |
|
|
|
|
|
child: Obx( |
|
|
|
|
|
() => Row( |
|
|
|
|
|
children: [ |
|
|
|
|
|
_iconItem(Icons.summarize, '概述', 0), |
|
|
|
|
|
_iconItem(Icons.message, '转写', 1), |
|
|
|
|
|
_iconItem(Icons.article, '总结', 2), |
|
|
|
|
|
_iconItem(Icons.lan, '思维导图', 3), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
Expanded( |
|
|
Expanded( |
|
|
@ -184,11 +226,15 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
child: TabBarView( |
|
|
child: TabBarView( |
|
|
controller: controller.tabController, |
|
|
controller: controller.tabController, |
|
|
physics: const NeverScrollableScrollPhysics(), |
|
|
physics: const NeverScrollableScrollPhysics(), |
|
|
children: const [ |
|
|
children: [ |
|
|
OverviewTab(), |
|
|
const OverviewTab(), |
|
|
SpeechTab(), |
|
|
const SpeechTab(), |
|
|
SummaryTab(), |
|
|
const SummaryTab(), |
|
|
MindMapTab(), |
|
|
Obx( |
|
|
|
|
|
() => controller.meetingDetails.value.summary.isNotEmpty |
|
|
|
|
|
? const MindMapTab() |
|
|
|
|
|
: const SizedBox(), |
|
|
|
|
|
), |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
@ -198,108 +244,131 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Widget _soundWave(bool isDarkMode) { |
|
|
Widget _soundWave(bool isDarkMode) { |
|
|
return Container( |
|
|
return Obx( |
|
|
height: 200.w, |
|
|
() => SizedBox( |
|
|
margin: EdgeInsets.only(bottom: 10.w), |
|
|
height: controller.dragOffset.value < 0 |
|
|
decoration: BoxDecoration( |
|
|
? 0 |
|
|
color: Colors.grey[200]!, |
|
|
: controller.dragOffset.value > 210.w |
|
|
borderRadius: BorderRadius.vertical( |
|
|
? 210.w |
|
|
bottom: Radius.circular(20.r), |
|
|
: controller.dragOffset.value, |
|
|
), |
|
|
child: Stack( |
|
|
), |
|
|
children: [ |
|
|
child: Column( |
|
|
Positioned( |
|
|
children: [ |
|
|
bottom: 0, |
|
|
Container( |
|
|
child: Container( |
|
|
margin: EdgeInsets.only(bottom: 5.w), |
|
|
width: 1.sw, |
|
|
decoration: BoxDecoration( |
|
|
height: 200.w, |
|
|
color: Colors.white, |
|
|
margin: EdgeInsets.only(bottom: 10.w), |
|
|
borderRadius: BorderRadius.circular(8.r), |
|
|
decoration: BoxDecoration( |
|
|
), |
|
|
color: Colors.grey[200]!, |
|
|
child: AudioFileWaveforms( |
|
|
borderRadius: BorderRadius.vertical( |
|
|
size: Size(350.w, 120.w), |
|
|
bottom: Radius.circular(20.r), |
|
|
playerController: controller.playerController, |
|
|
), |
|
|
playerWaveStyle: PlayerWaveStyle( |
|
|
), |
|
|
fixedWaveColor: Colors.grey[300]!, |
|
|
child: Column( |
|
|
liveWaveColor: Colors.red, |
|
|
children: [ |
|
|
seekLineColor: Colors.red, |
|
|
Container( |
|
|
scaleFactor: 600, |
|
|
margin: EdgeInsets.only(bottom: 5.w), |
|
|
), |
|
|
decoration: BoxDecoration( |
|
|
), |
|
|
color: Colors.white, |
|
|
), |
|
|
borderRadius: BorderRadius.circular(8.r), |
|
|
SizedBox( |
|
|
|
|
|
width: 350.w, |
|
|
|
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
StreamBuilder<int>( |
|
|
|
|
|
stream: controller.playerController.onCurrentDurationChanged, |
|
|
|
|
|
builder: (context, snapshot) { |
|
|
|
|
|
final position = snapshot.data ?? 0; |
|
|
|
|
|
return Text( |
|
|
|
|
|
DateUtil.formatDateMs( |
|
|
|
|
|
position, |
|
|
|
|
|
format: 'HH:mm:ss', |
|
|
|
|
|
isUtc: true, |
|
|
|
|
|
), |
|
|
), |
|
|
style: TextStyle( |
|
|
child: AudioFileWaveforms( |
|
|
color: isDarkMode ? Colors.grey[400] : Colors.grey[500], |
|
|
size: Size(350.w, 120.w), |
|
|
fontSize: 12.sp, |
|
|
playerController: controller.playerController, |
|
|
|
|
|
playerWaveStyle: PlayerWaveStyle( |
|
|
|
|
|
fixedWaveColor: Colors.grey[300]!, |
|
|
|
|
|
liveWaveColor: Colors.red, |
|
|
|
|
|
seekLineColor: Colors.red, |
|
|
|
|
|
scaleFactor: 600, |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
Obx( |
|
|
|
|
|
() => Text( |
|
|
|
|
|
DateUtil.formatDateMs( |
|
|
|
|
|
controller.durationMax.value, |
|
|
|
|
|
format: 'HH:mm:ss', |
|
|
|
|
|
isUtc: true, |
|
|
|
|
|
), |
|
|
), |
|
|
style: TextStyle( |
|
|
SizedBox( |
|
|
color: isDarkMode ? Colors.grey[400] : Colors.grey[500], |
|
|
width: 350.w, |
|
|
fontSize: 12.sp, |
|
|
child: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
children: [ |
|
|
|
|
|
StreamBuilder<int>( |
|
|
|
|
|
stream: controller |
|
|
|
|
|
.playerController.onCurrentDurationChanged, |
|
|
|
|
|
builder: (context, snapshot) { |
|
|
|
|
|
final position = snapshot.data ?? 0; |
|
|
|
|
|
return Text( |
|
|
|
|
|
DateUtil.formatDateMs( |
|
|
|
|
|
position, |
|
|
|
|
|
format: 'HH:mm:ss', |
|
|
|
|
|
isUtc: true, |
|
|
|
|
|
), |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
color: isDarkMode |
|
|
|
|
|
? Colors.grey[400] |
|
|
|
|
|
: Colors.grey[500], |
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
), |
|
|
|
|
|
); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
Obx( |
|
|
|
|
|
() => Text( |
|
|
|
|
|
DateUtil.formatDateMs( |
|
|
|
|
|
controller.durationMax.value, |
|
|
|
|
|
format: 'HH:mm:ss', |
|
|
|
|
|
isUtc: true, |
|
|
|
|
|
), |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
color: isDarkMode |
|
|
|
|
|
? Colors.grey[400] |
|
|
|
|
|
: Colors.grey[500], |
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
Row( |
|
|
), |
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
|
|
], |
|
|
children: [ |
|
|
), |
|
|
Icon( |
|
|
), |
|
|
Icons.replay_10, |
|
|
Row( |
|
|
color: Colors.black, |
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
|
|
size: 30.w, |
|
|
children: [ |
|
|
), |
|
|
Icon( |
|
|
StreamBuilder<PlayerState>( |
|
|
Icons.replay_10, |
|
|
stream: |
|
|
color: Colors.black, |
|
|
controller.playerController.onPlayerStateChanged, |
|
|
size: 30.w, |
|
|
builder: (context, snapshot) { |
|
|
), |
|
|
bool isPlay = snapshot.data?.isPlaying ?? false; |
|
|
StreamBuilder<PlayerState>( |
|
|
return GestureDetector( |
|
|
stream: controller.playerController.onPlayerStateChanged, |
|
|
onTap: () { |
|
|
builder: (context, snapshot) { |
|
|
if (isPlay) { |
|
|
bool isPlay = snapshot.data?.isPlaying ?? false; |
|
|
controller.playerController.pausePlayer(); |
|
|
return GestureDetector( |
|
|
} else { |
|
|
onTap: () { |
|
|
controller.playerController.startPlayer(); |
|
|
if (isPlay) { |
|
|
} |
|
|
controller.playerController.pausePlayer(); |
|
|
}, |
|
|
} else { |
|
|
child: Icon( |
|
|
controller.playerController.startPlayer(); |
|
|
isPlay ? Icons.pause_circle : Icons.play_circle, |
|
|
} |
|
|
color: Colors.black, |
|
|
}, |
|
|
size: 48.w, |
|
|
child: Icon( |
|
|
), |
|
|
isPlay ? Icons.pause_circle : Icons.play_circle, |
|
|
); |
|
|
color: Colors.black, |
|
|
}, |
|
|
size: 48.w, |
|
|
), |
|
|
|
|
|
Icon( |
|
|
|
|
|
Icons.forward_10, |
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
size: 30.w, |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
); |
|
|
], |
|
|
}, |
|
|
), |
|
|
), |
|
|
|
|
|
Icon( |
|
|
|
|
|
Icons.forward_10, |
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
size: 30.w, |
|
|
|
|
|
), |
|
|
), |
|
|
], |
|
|
), |
|
|
), |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
), |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|