|
|
|
@ -161,7 +161,46 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
|
|
|
|
// 构建主体内容 |
|
|
|
Widget _buildBody(BuildContext context, bool isDarkMode) { |
|
|
|
double initialPosition = 0; |
|
|
|
return Column( |
|
|
|
children: [ |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.translucent, |
|
|
|
onVerticalDragStart: (DragStartDetails dragStartDetails) { |
|
|
|
initialPosition = dragStartDetails.localPosition.dy; |
|
|
|
}, |
|
|
|
onVerticalDragUpdate: (DragUpdateDetails dragUpdateDetails) { |
|
|
|
controller.dragOffset.value += dragUpdateDetails.delta.dy; |
|
|
|
}, |
|
|
|
onVerticalDragEnd: (DragEndDetails dragEndDetails) { |
|
|
|
double offset = initialPosition - dragEndDetails.localPosition.dy; |
|
|
|
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( |
|
|
|
@ -178,17 +217,24 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
child: Padding( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w), |
|
|
|
child: TabBarView( |
|
|
|
controller: controller.tabController, |
|
|
|
physics: const NeverScrollableScrollPhysics(), |
|
|
|
children: const [ |
|
|
|
OverviewTab(), |
|
|
|
SpeechTab(), |
|
|
|
SummaryTab(), |
|
|
|
MindMapTab(), |
|
|
|
children: [ |
|
|
|
const OverviewTab(), |
|
|
|
const SpeechTab(), |
|
|
|
const SummaryTab(), |
|
|
|
Obx( |
|
|
|
() => controller.meetingDetails.value.summary.isNotEmpty |
|
|
|
? const MindMapTab() |
|
|
|
: const SizedBox(), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
@ -198,7 +244,19 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
} |
|
|
|
|
|
|
|
Widget _soundWave(bool isDarkMode) { |
|
|
|
return Container( |
|
|
|
return Obx( |
|
|
|
() => SizedBox( |
|
|
|
height: controller.dragOffset.value < 0 |
|
|
|
? 0 |
|
|
|
: controller.dragOffset.value > 210.w |
|
|
|
? 210.w |
|
|
|
: controller.dragOffset.value, |
|
|
|
child: Stack( |
|
|
|
children: [ |
|
|
|
Positioned( |
|
|
|
bottom: 0, |
|
|
|
child: Container( |
|
|
|
width: 1.sw, |
|
|
|
height: 200.w, |
|
|
|
margin: EdgeInsets.only(bottom: 10.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -232,7 +290,8 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
StreamBuilder<int>( |
|
|
|
stream: controller.playerController.onCurrentDurationChanged, |
|
|
|
stream: controller |
|
|
|
.playerController.onCurrentDurationChanged, |
|
|
|
builder: (context, snapshot) { |
|
|
|
final position = snapshot.data ?? 0; |
|
|
|
return Text( |
|
|
|
@ -242,7 +301,9 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
isUtc: true, |
|
|
|
), |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.grey[400] : Colors.grey[500], |
|
|
|
color: isDarkMode |
|
|
|
? Colors.grey[400] |
|
|
|
: Colors.grey[500], |
|
|
|
fontSize: 12.sp, |
|
|
|
), |
|
|
|
); |
|
|
|
@ -256,7 +317,9 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
isUtc: true, |
|
|
|
), |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.grey[400] : Colors.grey[500], |
|
|
|
color: isDarkMode |
|
|
|
? Colors.grey[400] |
|
|
|
: Colors.grey[500], |
|
|
|
fontSize: 12.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
@ -273,7 +336,8 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
size: 30.w, |
|
|
|
), |
|
|
|
StreamBuilder<PlayerState>( |
|
|
|
stream: controller.playerController.onPlayerStateChanged, |
|
|
|
stream: |
|
|
|
controller.playerController.onPlayerStateChanged, |
|
|
|
builder: (context, snapshot) { |
|
|
|
bool isPlay = snapshot.data?.isPlaying ?? false; |
|
|
|
return GestureDetector( |
|
|
|
@ -301,6 +365,11 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> { |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|